Right now I have the route as below;
resources :invoices do
collection do
match 'search' => 'invoices#search', via: [:get, :post], as: :search
end
end
But I would like to get 'deliveries#search' instead of 'invoices#search'.
I successfully customized for the below routes;
get 'deliveries', to: 'invoices#index', as: :deliveries
get 'deliveries/new', to: 'invoices#new', as: :delivery
get 'deliveries/:id/edit', to: 'invoices#edit', :as => :del
I have tried but unable to customized for the 'deliveries#search'.
Any suggestions are most welcome.
Thank you in advance.