resource available output parent resource rails 3.2 -


i have in routes.rb

resources :users, :path => "/", :only => [:show]   resources :collections, :controller => 'users/collections' end 

why can access collections resources from:

http://localhost:3000/en/collections 

if resouce inside users?

i want collection resource enable inside:

http://localhost:3000/en/users/collections 

this routes:

user_collections    (/:locale)/:user_id/collections(.:format)          users/collections#index                          post   (/:locale)/:user_id/collections(.:format)          users/collections#create      new_user_collection    (/:locale)/:user_id/collections/new(.:format)      users/collections#new     edit_user_collection    (/:locale)/:user_id/collections/:id/edit(.:format) users/collections#edit          user_collection    (/:locale)/:user_id/collections/:id(.:format)      users/collections#show                          put    (/:locale)/:user_id/collections/:id(.:format)      users/collections#update                          delete (/:locale)/:user_id/collections/:id(.:format)      users/collections#destroy 

how can it?

thank you

try this:

resources :users, :only => [:show]   resources :collections, :controller => 'users/collections' end 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -