diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2017-01-30 13:28:14 -0500 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2017-01-30 13:28:14 -0500 |
commit | 735aa635c5c70928583eeabc8bf4c5e3bc278f8b (patch) | |
tree | a8fa5bb304597b586b05c0b12f46653551fd2398 /actionmailer/lib | |
parent | bfc69e873dba88024e9a79bb13569e096fb39255 (diff) | |
download | rails-735aa635c5c70928583eeabc8bf4c5e3bc278f8b.tar.gz rails-735aa635c5c70928583eeabc8bf4c5e3bc278f8b.tar.bz2 rails-735aa635c5c70928583eeabc8bf4c5e3bc278f8b.zip |
Implement respond_to_missing? in the Parameterized::Mailer class
Diffstat (limited to 'actionmailer/lib')
-rw-r--r-- | actionmailer/lib/action_mailer/parameterized.rb | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/actionmailer/lib/action_mailer/parameterized.rb b/actionmailer/lib/action_mailer/parameterized.rb index 7fa9da1724..73d98c198d 100644 --- a/actionmailer/lib/action_mailer/parameterized.rb +++ b/actionmailer/lib/action_mailer/parameterized.rb @@ -103,13 +103,18 @@ module ActionMailer @mailer, @params = mailer, params end - def method_missing(method_name, *args) - if @mailer.action_methods.include?(method_name.to_s) - ActionMailer::Parameterized::MessageDelivery.new(@mailer, method_name, @params, *args) - else - super + private + def method_missing(method_name, *args) + if @mailer.action_methods.include?(method_name.to_s) + ActionMailer::Parameterized::MessageDelivery.new(@mailer, method_name, @params, *args) + else + super + end + end + + def respond_to_missing?(method, include_all = false) + @mailer.respond_to?(method, include_all) end - end end class MessageDelivery < ActionMailer::MessageDelivery # :nodoc: |