So in Rails2 you could setup a route like this:
resources :users, :as => 'members'
This way you st开发者_StackOverflow社区ill have your users_path
but it matches /members
Now, how do you go about doing this in Rails3? :as
parameter here means totally different thing and I can't find what makes it work as before.
I think what you're looking for is the :path
option:
resources :users, :path => 'members'
Tested it on my app and the users_path
still works, but matches /members
as required. It doesn't match /users
.
精彩评论