How to build specific resource routes in routes.rb
I have an app where I want to never be able to delete a Foo. How can I
configure resources :foos to not create the delete route?
Also, foos belong to bars and should only be shown on the bars show page.
I've tried the following get routes but I get the associated errors:
get "/foos/:id"
ArgumentError at /bars/1220
missing :controller
--
get "/foos"
ArgumentError at /bars/1220
missing :action
--
get "foos/show"
No route matches [GET] "/bars/1220"
(There is most definitely a route for this, and it works if I leave
resources :foos in the routes.rb file.)
I've read routing from the outside in a couple times but I guess I'm not
getting it. Any help would be appreciated.
No comments:
Post a Comment