After destroying a resource in my Rails application, the user can restore it clicking on a link.
Currently this restore action is routed to the destroy method of the corresponding resource controller.
When this method finds the resource in the database, it destroys it and moves the record in a trash table.
When it does not find the resource in the database, it searches for it in the trash table and if it finds the resource it restores it.
I am not very satisfied by this way of doing, with the destroy method having two purposes: destroy and restore.
I could create a dedicated restore action in my controller, but in a REST way, where would you place the restore request handling? In a dedicated controller? If so, with which method, PUT or POST?