From 082e299e978f705e6ceed747ead3d71ccba36ed4 Mon Sep 17 00:00:00 2001 From: Sebastian Martinez Date: Mon, 18 Apr 2011 23:37:27 -0300 Subject: docs for ActionMailer::Base.default_i18n_subject --- actionmailer/lib/action_mailer/base.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index cd76383931..b5d62ad14e 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -681,7 +681,10 @@ module ActionMailer #:nodoc: end end - def default_i18n_subject #:nodoc: + # Translates the +subject+ using Rails I18n class under [:actionmailer, 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. + def default_i18n_subject mailer_scope = self.class.mailer_name.gsub('/', '.') I18n.t(:subject, :scope => [mailer_scope, action_name], :default => action_name.humanize) end -- cgit v1.2.3