未验证 提交 0f05c87e 编写于 作者: A Andrew White 提交者: GitHub

Merge pull request #32032 from utilum/method_redefined

Avoid method_redefined warnings in  RouteSet::NamedRouteCollection
......@@ -153,13 +153,13 @@ def add_url_helper(name, defaults, &block)
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册