title: Rails 5 add custom action to REST route with :id
body: <p>In my Rails 5 app I have a route for a REST controller:</p>
  
  <pre><code>resources :payments
  </code></pre>
  
  <p>I want to add a new action pay to the resource, so I put:</p>
  
  <pre><code>resources :payments do
     get 'pay'
  end
  </code></pre>
  
  <p>Where as my original routes look for example like this:</p>
  
  <pre><code>/payments/:id/edit
  </code></pre>
  
  <p>The custom route uses :payment_id instead of :id</p>
  
  <pre><code>/payments/:payment_id/pay
  </code></pre>
  
  <p>How can I change the route to:</p>
  
  <pre><code>payments/:id/pay
  </code></pre>
  
  <p>?</p>
  
  <p>I need this because CanCanCan automatically sets the payment in the controller but looks for :id and not for :payment_id</p>