1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #32032 from utilum/method_redefined

Avoid method_redefined warnings in  RouteSet::NamedRouteCollection
This commit is contained in:
Andrew White 2018-02-19 15:04:23 +00:00 committed by GitHub
commit 0f05c87e7a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -153,13 +153,13 @@ module ActionDispatch
url_name = :"#{name}_url"
@path_helpers_module.module_eval do
define_method(path_name) do |*args|
redefine_method(path_name) do |*args|
helper.call(self, args, true)
end
end
@url_helpers_module.module_eval do
define_method(url_name) do |*args|
redefine_method(url_name) do |*args|
helper.call(self, args, false)
end
end