我的路线.rb
resources :users do
resources :tags, on: :collection
get :some_page, on: :collection
end
和耙路线
users/:user_id/tags(.:format) --- tags#index
users/:user_id/tags(.:format) --- tags#create
users/:user_id/tags/new(.:format) --- tags#new
//......
users/some_page(.:format) --- users#some_page
并且有 2 个控制器:UsersController
和UsersTagsController
.
我希望标签的路线是:
users/tags(.:format) --- users_tags#index
users/tags(.:format) --- users_tags#create
users/tags/new(.:format) --- users_tags#new
//............
为什么它们看起来不像这样,我该如何解决?