mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
docs for ActionMailer::Base.default_i18n_subject
This commit is contained in:
parent
280a870992
commit
082e299e97
1 changed files with 4 additions and 1 deletions
|
@ -681,7 +681,10 @@ module ActionMailer #:nodoc:
|
|||
end
|
||||
end
|
||||
|
||||
def default_i18n_subject #:nodoc:
|
||||
# Translates the +subject+ using Rails I18n class under <tt>[:actionmailer, mailer_scope, action_name]</tt> scope.
|
||||
# If it does not find a translation for the +subject+ under the specified scope it will default to a
|
||||
# humanized version of the <tt>action_name</tt>.
|
||||
def default_i18n_subject
|
||||
mailer_scope = self.class.mailer_name.gsub('/', '.')
|
||||
I18n.t(:subject, :scope => [mailer_scope, action_name], :default => action_name.humanize)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue