aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/routing/inspector.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_dispatch/routing/inspector.rb')
-rw-r--r--actionpack/lib/action_dispatch/routing/inspector.rb8
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?