new_my_store GET /my/stores/new(.:format) my/stores#new
namespace "my" do
resources :stores,only: :new
end
new_store GET /mytest/stores/new(.:format) stores#new
scope '/mytest' do
resources :stores,only: :new
end
users GET /users(.:format) admin/users#index
scope module: :admin do
resources :users,only: :index
end
以上区别在于1:namespace :创建的helper方法 new_my_store_path scope使用的helper方法:new_store_path
2:scope modeuld :admin 路由中不不显示,调用的是Admin::Users#index
3:scope '/admin'路有种包含/admin,调用的是 Stores#new