You may try:
map.resources :rants, :controller => 'blog_posts'
map.resources :users do |users|
users.resources :rants, :controller => 'blog_posts'
end
This will give you a URL-address yoursite.com/users/5/rants/you are looking for, and it will generate convenient methods (for example: users_rants_path(@user))
Hope this helps.
source
share