From 4d7b2ee52481078228ac0283024a72b7d80a39db Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Wed, 29 Sep 2010 15:07:33 -0700 Subject: dry up method missing --- actionmailer/lib/action_mailer/base.rb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'actionmailer/lib/action_mailer/base.rb') diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 6ae3940e6d..2901add71d 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -421,11 +421,8 @@ module ActionMailer #:nodoc: end def method_missing(method, *args) #:nodoc: - if action_methods.include?(method.to_s) - new(method, *args).message - else - super - end + return super unless respond_to?(method) + new(method, *args).message end end -- cgit v1.2.3 From e8c9cac1c3c3e04481418e6dbe5b0eb479c70dae Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Wed, 29 Sep 2010 15:16:44 -0700 Subject: self is implied, so remove self --- actionmailer/lib/action_mailer/base.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionmailer/lib/action_mailer/base.rb') diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 2901add71d..0bf60a2c24 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -409,7 +409,7 @@ module ActionMailer #:nodoc: protected def set_payload_for_mail(payload, mail) #:nodoc: - payload[:mailer] = self.name + payload[:mailer] = name payload[:message_id] = mail.message_id payload[:subject] = mail.subject payload[:to] = mail.to -- cgit v1.2.3