Reputation: 52588
I'm attempting to clean up any routes, controller actions, and views that literally never get used in an application (that is, they'd be impossible to visit unless a user happened to guess the route).
(these sometimes appear because I think I'll need it, so set up the route, action, and view, then work takes a different direction and it doesn't get used)
The problem is how do I confidently tell if a certain route is ever linked to in an app?
If the route looked like this
# routes.rb
'payments-setup-status' => 'user#payments_setup_status'
Then I could search the entire repository for payments-setup-status
and for payments_setup_status_url
and payments_setup_status_path
. If I find no links to it, then assume it's unused anywhere in the app.
I am not sure what else I could do, or if there is some more 'intelligent' way of figuring out which routes/actions/views are not used in an application?
Upvotes: 0
Views: 124
Reputation: 52588
A suggestion offered in another forum:
Upvotes: 1