diff options
author | robertomiranda <rjmaltamar@gmail.com> | 2015-01-31 23:12:37 -0500 |
---|---|---|
committer | robertomiranda <rjmaltamar@gmail.com> | 2015-01-31 23:12:41 -0500 |
commit | ce8efcf296479b506ff36695398f6c88ea3c9e72 (patch) | |
tree | 2aef8dd1b83a5729118fe829836207ff91fb3045 /actionpack/lib | |
parent | c46c1c1599a9b00373e6ae8d855e372f3435a832 (diff) | |
download | rails-ce8efcf296479b506ff36695398f6c88ea3c9e72.tar.gz rails-ce8efcf296479b506ff36695398f6c88ea3c9e72.tar.bz2 rails-ce8efcf296479b506ff36695398f6c88ea3c9e72.zip |
Use public Module#include, in favor of https://bugs.ruby-lang.org/issues/8846
ref: https://github.com/rails/rails/pull/18763#issuecomment-72349769
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/abstract_controller/railties/routes_helpers.rb | 4 | ||||
-rw-r--r-- | actionpack/lib/action_dispatch/testing/assertions/routing.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/abstract_controller/railties/routes_helpers.rb b/actionpack/lib/abstract_controller/railties/routes_helpers.rb index 568c47e43a..14b574e322 100644 --- a/actionpack/lib/abstract_controller/railties/routes_helpers.rb +++ b/actionpack/lib/abstract_controller/railties/routes_helpers.rb @@ -6,9 +6,9 @@ module AbstractController define_method(:inherited) do |klass| super(klass) if namespace = klass.parents.detect { |m| m.respond_to?(:railtie_routes_url_helpers) } - klass.send(:include, namespace.railtie_routes_url_helpers(include_path_helpers)) + klass.include(namespace.railtie_routes_url_helpers(include_path_helpers)) else - klass.send(:include, routes.url_helpers(include_path_helpers)) + klass.include(routes.url_helpers(include_path_helpers)) end end end diff --git a/actionpack/lib/action_dispatch/testing/assertions/routing.rb b/actionpack/lib/action_dispatch/testing/assertions/routing.rb index 28dc88d317..a927738b42 100644 --- a/actionpack/lib/action_dispatch/testing/assertions/routing.rb +++ b/actionpack/lib/action_dispatch/testing/assertions/routing.rb @@ -144,7 +144,7 @@ module ActionDispatch old_controller, @controller = @controller, @controller.clone _routes = @routes - @controller.singleton_class.send(:include, _routes.url_helpers) + @controller.singleton_class.include(_routes.url_helpers) @controller.view_context_class = Class.new(@controller.view_context_class) do include _routes.url_helpers end |