resources :deliveries, controller: 'invoices', only: [:index, :new, :edit] do collection do get :search post :search end end