mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
don't pass unnecessary argument
This commit is contained in:
parent
1a046ab9bf
commit
0e6b588b3d
1 changed files with 2 additions and 2 deletions
|
@ -191,7 +191,7 @@ module ActionDispatch
|
|||
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 @@ module ActionDispatch
|
|||
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
|
||||
|
||||
|
|
Loading…
Reference in a new issue