Adding custom :new routes using Rails 3 routing
Posted
by aaronrussell
on Stack Overflow
See other posts from Stack Overflow
or by aaronrussell
Published on 2010-06-15T11:04:29Z
Indexed on
2010/06/15
11:32 UTC
Read the original article
Hit count: 256
In Rails 2 we can add custom new
actions to resourceful routes, like:
map.resources :users, :new => {:apply => :get}
How do we achieve the same thing in Rails 3?
resources :users do
get :apply, :on => :new # does not work
new do
get :apply # also does not work
end
end
Any ideas?
© Stack Overflow or respective owner