0
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
내가 어떻게 할 수 있습니까?
는
다시 시작 했습니까? – jdoe
예, 경로를 변경 한 후 서버를 다시 시작했습니다. 레일 3.2를 사용하고 있습니다. – hyperrjas
필요하십니까 : 경로 => "/"? – Anil