Permalink
Browse files

Merge pull request #5243 from lest/patch-2

don't pass unnecessary argument
  • Loading branch information...
2 parents 1a046ab + 0e6b588 commit d08a7c18183e74707f5f734f696c7e1cd1acd050 @josevalim josevalim committed Mar 2, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 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 d08a7c1

Please sign in to comment.