0

내가자원 가능한 출력 상위 자원은 3.2

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

이유는 무엇에서 컬렉션 리소스에 액세스 할 수 있습니다 내 routes.rb이있는 레일?

나는 collection resource가 아니라 내부 사용하도록 설정하는 것이 원하는 :

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

이 내 경로입니다 :

user_collections GET (/:locale)/:user_id/collections(.:format)   users/collections#index 
         POST (/:locale)/:user_id/collections(.:format)   users/collections#create 
    new_user_collection GET (/:locale)/:user_id/collections/new(.:format)  users/collections#new 
    edit_user_collection GET (/:locale)/:user_id/collections/:id/edit(.:format) users/collections#edit 
     user_collection GET (/: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 

내가 어떻게 할 수 있습니까?

+0

다시 시작 했습니까? – jdoe

+0

예, 경로를 변경 한 후 서버를 다시 시작했습니다. 레일 3.2를 사용하고 있습니다. – hyperrjas

+0

필요하십니까 : 경로 => "/"? – Anil

답변

0

이 시도 감사 : 당신이 당신의 경로를 변경 한 후 앱이

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

나는이 URL을 원한다. http : // localhost : 3000/en/kevin29/collections'이 URL을 원한다. http : // localhost : 3000/en/users/kevin29/! – hyperrjas