11155
(-- --)
January 10, 2010, 6:51pm
1
Hi,
my question is about routing:
is it possible to remove a restful action from map.resources ?
if few words:
I have a City model, and I've declared in routes.rb file:
map.resources :users
then I obtain ALL restful action, but I don't need neither delete and
update action.
Do you know some way to remove them ?
Thank you,
Alessandro
As far as you know you can't. But why would you want to remove certain
previously created actions from your routes? Why not just not create
the delete and update methods in your controller?
Sure you can:
map.resources :users, :except => [:delete, :update]
there's also an :only option
11155
(-- --)
January 10, 2010, 9:02pm
4
Perfect !
I did't see it in the rails docs.
Thank you,
Alessandro DS
Rick Denatale wrote: