From 2506d4ad9e79532a0000ebd73baf0478db30f5c9 Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Mon, 14 May 2012 06:18:42 -0700 Subject: Merge pull request #6018 from lest/patch-1 mailer can be anonymous --- actionmailer/lib/action_mailer/base.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'actionmailer/lib') 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 -- cgit v1.2.3