提交 0e6b588b 编写于 作者: S Sergey Nartimov

don't pass unnecessary argument

上级 1a046ab9
......@@ -191,7 +191,7 @@ def define_url_helper(route, name, kind, options)
selector = url_helper_name(name, kind)
hash_access_method = hash_access_name(name, kind)
if optimize_helper?(kind, route)
if optimize_helper?(route)
@module.module_eval <<-END_EVAL, __FILE__, __LINE__ + 1
remove_possible_method :#{selector}
def #{selector}(*args)
......@@ -217,7 +217,7 @@ def #{selector}(*args)
end
# Clause check about when we need to generate an optimized helper.
def optimize_helper?(kind, route) #:nodoc:
def optimize_helper?(route) #:nodoc:
route.ast.grep(Journey::Nodes::Star).empty? && route.requirements.except(:controller, :action).empty?
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册