diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-01-05 13:45:43 -0200 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-01-05 13:45:44 -0200 |
commit | 0aadca2d8392c197cbda45188b461d6d686ca24e (patch) | |
tree | df5ee0ea8d898e0dd19c1173496a22f25c1d07b0 | |
parent | c1eaff00b748ab976d3a99d00468da60f25a8e8d (diff) | |
download | rails-0aadca2d8392c197cbda45188b461d6d686ca24e.tar.gz rails-0aadca2d8392c197cbda45188b461d6d686ca24e.tar.bz2 rails-0aadca2d8392c197cbda45188b461d6d686ca24e.zip |
Remove warning, remove not used variable, and make methods private
Warning: "shadowing outer local variable - routes".
-rw-r--r-- | actionpack/lib/action_dispatch/routing/inspector.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/actionpack/lib/action_dispatch/routing/inspector.rb b/actionpack/lib/action_dispatch/routing/inspector.rb index 7ae1d2a0ee..e607f8b8d5 100644 --- a/actionpack/lib/action_dispatch/routing/inspector.rb +++ b/actionpack/lib/action_dispatch/routing/inspector.rb @@ -75,13 +75,15 @@ module ActionDispatch routes = collect_routes(routes_to_display) formatter.section :application, 'Application routes', routes - @engines.each do |name, routes| - formatter.section :engine, "Routes for #{name}", routes + @engines.each do |name, engine_routes| + formatter.section :engine, "Routes for #{name}", engine_routes end formatter.result end + private + def filter_routes(filter) if filter @routes.select { |route| route.defaults[:controller] == filter } @@ -91,7 +93,7 @@ module ActionDispatch end def collect_routes(routes) - routes = routes.collect do |route| + routes.collect do |route| RouteWrapper.new(route) end.reject do |route| route.internal? |