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
1 changed files with 2 additions and 2 deletions

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