Skip to content

Instantly share code, notes, and snippets.

@srockstyle
Last active January 30, 2017 00:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save srockstyle/8661358 to your computer and use it in GitHub Desktop.
Save srockstyle/8661358 to your computer and use it in GitHub Desktop.
Railsのroutesでnamespaceとscopeの設定 ref: http://qiita.com/srockstyle/items/5b0bf6fe2a78e1aa7363
namespace :v3 do
get "/test/read",:to=>"test#read"
end
GET /v3/test/read(.:format) v3/test#read
scope :v3 do
get "/test/read",:to=>"test#read"
end
GET /v3/test/read(.:format) test#read
12 namespace :artists do
13 get 'similars/index'
14 get 'similars/show'
15 get 'tags/index'
16 get 'tags/show'
17 end
/artists/simmilar/index
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment