Permalink
Browse files

Remove warning, remove not used variable, and make methods private

Warning: "shadowing outer local variable - routes".
  • Loading branch information...
1 parent c1eaff0 commit 0aadca2d8392c197cbda45188b461d6d686ca24e @carlosantoniodasilva carlosantoniodasilva committed Jan 5, 2013
Showing with 5 additions and 3 deletions.
  1. +5 −3 actionpack/lib/action_dispatch/routing/inspector.rb
View
8 actionpack/lib/action_dispatch/routing/inspector.rb
@@ -75,13 +75,15 @@ def format(formatter, filter = nil)
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 @@ def filter_routes(filter)
end
def collect_routes(routes)
- routes = routes.collect do |route|
+ routes.collect do |route|
RouteWrapper.new(route)
end.reject do |route|
route.internal?

0 comments on commit 0aadca2

Please sign in to comment.