aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer
diff options
context:
space:
mode:
authorSebastian Martinez <sebastian@wyeworks.com>2011-04-18 23:37:27 -0300
committerSebastian Martinez <sebastian@wyeworks.com>2011-04-18 23:37:27 -0300
commit082e299e978f705e6ceed747ead3d71ccba36ed4 (patch)
tree7c0c6ec0b20e76272d9aaa125b31465d260674bf /actionmailer
parent280a8709923d2bf707ec4d82ac1e5cb14941da3d (diff)
downloadrails-082e299e978f705e6ceed747ead3d71ccba36ed4.tar.gz
rails-082e299e978f705e6ceed747ead3d71ccba36ed4.tar.bz2
rails-082e299e978f705e6ceed747ead3d71ccba36ed4.zip
docs for ActionMailer::Base.default_i18n_subject
Diffstat (limited to 'actionmailer')
-rw-r--r--actionmailer/lib/action_mailer/base.rb5
1 files changed, 4 insertions, 1 deletions
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 <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