Hi everyone :)
I'd like to know how to add nested routes within the users parent
resource.
Thanks to this sort of code:
devise_for :users do
resources :posts
end
I would like to have these routes:
- GET /users/:id/posts
- GET /users/:id/posts/new
- POST /users/:id/posts
etc.
But the code above doesn't generate such a thing, I only get the
"normal routes" :
GET /posts
GET /posts/new
POST /posts
etc.
So I'd like to learn the correct way to add nested resources to users
using devise_for.
I came accross this discussion :
http://groups.google.com/group/plataformatec-devise/browse_thread/thread/8cbb5ac87ad08cff/f1a1b7af655789a6
Where this
resources :businesses do
devise_for :users
end
Generates somehow the routes I want but it doesn't seem to be a normal
behaviour nor the rails way.
Thanks for your help :)
Kulgar.
PS: It would be great to add this issue (when solved) to the "how to"
wiki of Devise on GIT Hub.