:except options in routes that contain collections and members not working
Currently the route exceptions are still showing up when I run rake routes
.
resources :userhome, :except => [:new, :create, :edit, :update, :show, :destroy] do
collection do
开发者_如何学Python post :create_invitation
end
member do
get :edit_profile_picture
post :update_profile_picture
end
end
How can I make the exceptions work?
A simpler way to eliminate unneeded routes is by specifying the :only
option
resources :userhome, :only => [:index]
instead of
resources :userhome, :except => [:new, :create, :edit, :update, :show, :destroy]
精彩评论