Last active
January 30, 2017 00:34
-
-
Save srockstyle/8661358 to your computer and use it in GitHub Desktop.
Railsのroutesでnamespaceとscopeの設定 ref: http://qiita.com/srockstyle/items/5b0bf6fe2a78e1aa7363
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace :v3 do | |
get "/test/read",:to=>"test#read" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GET /v3/test/read(.:format) v3/test#read |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scope :v3 do | |
get "/test/read",:to=>"test#read" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GET /v3/test/read(.:format) test#read |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 namespace :artists do | |
13 get 'similars/index' | |
14 get 'similars/show' | |
15 get 'tags/index' | |
16 get 'tags/show' | |
17 end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/artists/simmilar/index |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment