Class: ActionMailer::Base
- Inherits:
-
Object
- Object
- ActionMailer::Base
- Defined in:
- lib/translator.rb
Instance Method Summary collapse
-
#translate(key, options = {}) ⇒ Object
(also: #t)
Add a
translate
(ort
) method to ActionMailer that is context-aware of what mailer and action is being invoked.
Instance Method Details
#translate(key, options = {}) ⇒ Object Also known as: t
Add a translate
(or t
) method to ActionMailer that is context-aware of what mailer and action is being invoked. Initial scoping of [:mailer_name :action_name] where mailer_name is like ‘comment_mailer’ and action_name is ‘comment_notification’ (note: no “deliver_” or “create_”)
336 337 338 |
# File 'lib/translator.rb', line 336 def translate(key, ={}) Translator.translate_with_scope([self.mailer_name, self.action_name], key, ) end |