aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/lib
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-05-14 06:18:42 -0700
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-05-14 10:21:27 -0300
commit2506d4ad9e79532a0000ebd73baf0478db30f5c9 (patch)
treee77c2f11760eaac4dbebd7481db2c6009785e39f /actionmailer/lib
parentec68258f19678d47acc6e5684c9dbc18a7382589 (diff)
downloadrails-2506d4ad9e79532a0000ebd73baf0478db30f5c9.tar.gz
rails-2506d4ad9e79532a0000ebd73baf0478db30f5c9.tar.bz2
rails-2506d4ad9e79532a0000ebd73baf0478db30f5c9.zip
Merge pull request #6018 from lest/patch-1
mailer can be anonymous
Diffstat (limited to 'actionmailer/lib')
-rw-r--r--actionmailer/lib/action_mailer/base.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb
index 8f2c567e3e..2a11cb6ca7 100644
--- a/actionmailer/lib/action_mailer/base.rb
+++ b/actionmailer/lib/action_mailer/base.rb
@@ -5,6 +5,7 @@ require 'active_support/core_ext/object/blank'
require 'active_support/core_ext/proc'
require 'active_support/core_ext/string/inflections'
require 'active_support/core_ext/hash/except'
+require 'active_support/core_ext/module/anonymous'
require 'action_mailer/log_subscriber'
module ActionMailer #:nodoc:
@@ -375,7 +376,7 @@ module ActionMailer #:nodoc:
end
def mailer_name
- @mailer_name ||= name.underscore
+ @mailer_name ||= anonymous? ? "anonymous" : name.underscore
end
attr_writer :mailer_name
alias :controller_path :mailer_name