I have a task_list model that has some actions like archive and destroy. I want to route them like this:
resources :task_lists, only: [:create, :update] do
member do
delete '' => 'task_lists#archive'
delete 'destroy' => 'task_lists#destroy'
end
end
but rake routes gives same route for both of them.
DELETE /api/0.0/task_lists/:id(.:format) task_lists#archive {:format=>:json}
task_list DELETE /api/0.0/task_lists/:id(.:format) task_lists#destroy {:format=>:json}
so what can I do?
Thanks!
Aucun commentaire:
Enregistrer un commentaire