instance method
date
Ruby on Rails 2.2.3
Since v2.2.3 Last seen in v2.3.18Available in: v2.2.3 v2.3.18
Signature
date( default = nil )
Returns the date of the email message as per the “date” header value or returns nil by default (if no date field exists).
You can also pass whatever default you want into this method and it will return that instead of nil if there is no date already set.
Parameters
-
defaultopt = nil
Source
# File actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/interface.rb, line 115
def date( default = nil )
if h = @header['date']
h.date
else
default
end
end
Defined in actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/interface.rb line 115
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in TMail::Mail