I have an invoices_controller
which has resource routes. Like following:
resources :invoices do
resources :items, only: [:create, :destroy, :update]
end
Now I want to add a send functionality to the invoice, How do I add a custom route as invoices/:id/send
that dispatch the request to say invoices#send_invoice
and how should I link to it in the views.
What is the conventional rails way to do it. Thanks.