aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorSergey Nartimov <just.lest@gmail.com>2012-03-02 19:01:53 +0300
committerSergey Nartimov <just.lest@gmail.com>2012-03-02 19:01:53 +0300
commit0e6b588b3df595cecd18eb523f5f75c413df8277 (patch)
tree4e79c4d605e231a36a6ee95714f1cdfa1ff647de /actionpack/lib
parent1a046ab9bf7f0c3fa045a2b771a5a22d318f02ff (diff)
downloadrails-0e6b588b3df595cecd18eb523f5f75c413df8277.tar.gz
rails-0e6b588b3df595cecd18eb523f5f75c413df8277.tar.bz2
rails-0e6b588b3df595cecd18eb523f5f75c413df8277.zip
don't pass unnecessary argument
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_dispatch/routing/route_set.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb
index c4d87ea3d9..30e9e5634b 100644
--- a/actionpack/lib/action_dispatch/routing/route_set.rb
+++ b/actionpack/lib/action_dispatch/routing/route_set.rb
@@ -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