aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAkira Matsuda <ronnie@dio.jp>2017-01-15 03:58:19 +0900
committerAkira Matsuda <ronnie@dio.jp>2017-01-15 03:58:19 +0900
commitec513098fec963b7bb30fda246cae8ed82ec718c (patch)
treed7ae118f9df6a10ee49f43f0e8c7f95e48c4c6af
parentb99014bf44252e46e4e11e1df7cbded89e3e5465 (diff)
downloadrails-ec513098fec963b7bb30fda246cae8ed82ec718c.tar.gz
rails-ec513098fec963b7bb30fda246cae8ed82ec718c.tar.bz2
rails-ec513098fec963b7bb30fda246cae8ed82ec718c.zip
`respond_to_missing?` should fallback to `super` where method_missing could call `super`
-rw-r--r--actionmailer/lib/action_mailer/base.rb2
-rw-r--r--actionpack/lib/action_dispatch/http/mime_type.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb
index 8205743de3..ce6c03f43f 100644
--- a/actionmailer/lib/action_mailer/base.rb
+++ b/actionmailer/lib/action_mailer/base.rb
@@ -580,7 +580,7 @@ module ActionMailer
end
def respond_to_missing?(method, include_all = false)
- action_methods.include?(method.to_s)
+ action_methods.include?(method.to_s) || self
end
end
diff --git a/actionpack/lib/action_dispatch/http/mime_type.rb b/actionpack/lib/action_dispatch/http/mime_type.rb
index 6b718e3682..1a65e2d1cb 100644
--- a/actionpack/lib/action_dispatch/http/mime_type.rb
+++ b/actionpack/lib/action_dispatch/http/mime_type.rb
@@ -298,7 +298,7 @@ module Mime
end
def respond_to_missing?(method, include_private = false)
- method.to_s.ends_with? "?"
+ (method.to_s.ends_with? "?") || super
end
end