instance method
default_i18n_subject
Ruby on Rails 5.2.8.1
Since v4.0.13 PrivateSignature
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 878
def default_i18n_subject(interpolations = {}) # :doc:
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 878
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionMailer::Base