Skip to content

Commit

Permalink
redirect_to routes can be considered reachable routes
Browse files Browse the repository at this point in the history
  • Loading branch information
amatsuda committed Feb 12, 2018
1 parent dec6516 commit 115a290
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/traceroute.rb
Expand Up @@ -35,8 +35,10 @@ def routed_actions
"#{r.requirements[:controller]}##{r.requirements[:action]}"
elsif r.path == '/:controller(/:action(/:id(.:format)))'
%Q["#{r.path}" This is a legacy wild controller route that's not recommended for RESTful applications.]
else
elsif (ActionDispatch::Routing::Mapper::Constraints === r.app) && (ActionDispatch::Routing::PathRedirect === r.app.app)
nil
else
'(unknown)'
end
end.compact.flatten.reject {|r| @ignored_unused_routes.any? { |m| r.match(m) } }
end
Expand Down

0 comments on commit 115a290

Please sign in to comment.