amatsuda / traceroute

A Rake task gem that helps you find the unused routes and controller actions for your Rails 3+ app
MIT License
902 stars 38 forks source link

Ignore Option Redirects When Collecting Routes #46

Closed zachingle closed 2 years ago

zachingle commented 2 years ago

Found this bug when upgrading the good_job gem which has an engine which uses redirects in its routes, more specifically, redirects with named arguments.

These also didn't appear under the /good_job path:

Unused routes (2):
  /
  /jobs/mass_update(.:format)

This PR updates the collect_routes method to ignore ActionDispatch::Routing::OptionRedirect routes, which are created when using redirects with named arguments

amatsuda commented 2 years ago

@ZachIngle Thank you!

yenshirak commented 4 months ago

@amatsuda When will this be released?