mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
docs for ActionMailer::Base.default_i18n_subject
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user