Browse files

don't pass unnecessary argument

  • Loading branch information...
1 parent 1a046ab commit 0e6b588b3df595cecd18eb523f5f75c413df8277 @lest lest committed Mar 2, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 actionpack/lib/action_dispatch/routing/route_set.rb
View
4 actionpack/lib/action_dispatch/routing/route_set.rb
@@ -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

0 comments on commit 0e6b588

Please sign in to comment.