title: How to tell if a route/method/view ever gets used?
body: <p>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).</p>
  <p>(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)</p>
  <p>The problem is how do I <strong>confidently</strong> tell if a certain route is ever linked to in an app?</p>
  <h3>What I already know</h3>
  <p>If the route looked like this</p>
  <pre><code># routes.rb
  
  'payments-setup-status' =&gt; 'user#payments_setup_status'
  </code></pre>
  <p>Then I could search the entire repository for <code>payments-setup-status</code> <em>and</em> for <code>payments_setup_status_url</code> <em>and</em> <code>payments_setup_status_path</code>. If I find no links to it, then assume it's unused anywhere in the app.</p>
  <p>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?</p>