开发者

Rails Route w/ Namespace & Resources

开发者 https://www.devze.com 2023-03-08 15:39 出处:网络
I have the following in my routes.rb: namespace \'services\' do resources :api_applications, :path => \'apps\' do

I have the following in my routes.rb:

namespace 'services' do

  resources :api_applications, :path => 'apps' do 

  end

end

This produces:

/services/apps/1/ which is mapped to :services_api_application_path

How can I make sure that all of the api_applications routes do not have the services_ prefix while having them remain inside of the services namespa开发者_运维技巧ce or individually writing each route out with the :as => parameter?


namespace 'services', :as => '' do
0

精彩评论

暂无评论...
验证码 换一张
取 消