Umi and Satomi

シーズー犬うみと飼い主Satomiが楽しく生活してみます

difference between namespace and scope at config/routes.rb

memo

namespace

namespace :api do
  get '/test' => 'tests#index'
end

=>
GET  /api/test(.:format)    api/tests#index

scope

scope :api do
  get '/test' => 'tests#index'
end

=>
GET  /api/test(.:format)    tests#index