decactest/config/routes.rb
2016-08-11 17:26:42 +09:30

13 lines
357 B
Ruby

require 'api_constraints'
Rails.application.routes.draw do
devise_for :users
# Api definition
namespace :api, defaults: { format: :json }, constraints: { subdomain: 'api' }, path: '/' do
scope module: :v1, constraints: ApiConstraints.new(version: 1, default: true) do
# List resources
resources :users, :only => [:show]
end
end
end