How to make nested route actions act as a first-class member?
resources :links do
resources :favorites
end
I would like to make actions of FavoritesController (favorite/unfavorite or create/destroy) act like first-class members of LinksController inside routes, e.g. /link/:id/unfavorite..
Would that be RESTful? Or should I put favorite/unfavorite actions right inside LinksController?
I guess you want something like that:
You must define favorite and unfavorite actions in your LinksController.