我的 routes.rb 中有这个
resources :users, :path => "/", :only => [:show] do
resources :collections, :controller => 'users/collections'
end
为什么我可以从以下位置访问收藏资源:
http://localhost:3000/en/collections
如果这会在内部用户中获取此资源?
我只想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
我该怎么做?
谢谢