diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2017-04-25 17:38:56 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-25 17:38:56 -0700 |
commit | c7ee244644903da5045c54f72e25a8ee6eb3bd68 (patch) | |
tree | a2359c8bc5d8afd7abd64ad5e9445b68ab1e3bc9 /railties | |
parent | 550b5e0824cc1cbbe21a1554d1b3f347af08dd30 (diff) | |
parent | ca9ac310028d0009edf1fbf657541d2dea327535 (diff) | |
download | rails-c7ee244644903da5045c54f72e25a8ee6eb3bd68.tar.gz rails-c7ee244644903da5045c54f72e25a8ee6eb3bd68.tar.bz2 rails-c7ee244644903da5045c54f72e25a8ee6eb3bd68.zip |
Merge pull request #28831 from kamipo/respond_to_missing_should_be_private
`respond_to_missing?` should be private
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/railtie.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/railties/lib/rails/railtie.rb b/railties/lib/rails/railtie.rb index 474118c0a9..3476bb0eb5 100644 --- a/railties/lib/rails/railtie.rb +++ b/railties/lib/rails/railtie.rb @@ -162,10 +162,6 @@ module Rails @instance ||= new end - def respond_to_missing?(*args) - instance.respond_to?(*args) || super - end - # Allows you to configure the railtie. This is the same method seen in # Railtie::Configurable, but this module is no longer required for all # subclasses of Railtie so we provide the class method here. @@ -178,6 +174,10 @@ module Rails ActiveSupport::Inflector.underscore(string).tr("/", "_") end + def respond_to_missing?(name, _) + instance.respond_to?(name) || super + end + # If the class method does not have a method, then send the method call # to the Railtie instance. def method_missing(name, *args, &block) |