instance method
default_i18n_subject
Ruby on Rails 4.1.16
Since v4.0.13Signature
default_i18n_subject(interpolations = {})
Translates the subject using Rails I18n class under [mailer_scope, action_name] scope. If it does not find a translation for the subject under the specified scope it will default to a humanized version of the action_name. If the subject has interpolations, you can pass them through the interpolations parameter.
Parameters
-
interpolationsopt = {}
Source
# File actionmailer/lib/action_mailer/base.rb, line 839
def default_i18n_subject(interpolations = {})
mailer_scope = self.class.mailer_name.tr('/', '.')
I18n.t(:subject, interpolations.merge(scope: [mailer_scope, action_name], default: action_name.humanize))
end
Defined in actionmailer/lib/action_mailer/base.rb line 839
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionMailer::Base