Skip to content

Instantly share code, notes, and snippets.

@satomixx
Created May 13, 2015 01:55
Show Gist options
  • Save satomixx/bd99f2b6bf72e388a1ce to your computer and use it in GitHub Desktop.
Save satomixx/bd99f2b6bf72e388a1ce to your computer and use it in GitHub Desktop.
[Rails] config/routes.rbでのnamespaceとscopeの違い ref: http://qiita.com/tsumekoara/items/90b7439c787817df953f
namespace :api do
get '/test' => 'tests#index'
end
=>
GET /api/test(.:format) api/tests#index
scope :api do
get '/test' => 'tests#index'
end
=>
GET /api/test(.:format) tests#index
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment