From 1cf4cc5c8d571b571367a08f5e201be868289ed1 Mon Sep 17 00:00:00 2001 From: Azul Date: Wed, 16 Jan 2013 13:16:38 +0100 Subject: using subdomain for api requests properly --- users/config/routes.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'users/config') diff --git a/users/config/routes.rb b/users/config/routes.rb index 723d737..0c2d8d9 100644 --- a/users/config/routes.rb +++ b/users/config/routes.rb @@ -1,11 +1,11 @@ Rails.application.routes.draw do constraints :subdomain => "api" do - namespace "api", :path => nil do - scope "/1", :module => "V1", defaults: {format: 'json'} do - resources :sessions, :only => [:new, :create, :update, :destroy] - resources :users, :only => [:create] - end + namespace "api", { module: "V1", + path: "/1/", + defaults: {format: 'json'} } do + resources :sessions, :only => [:new, :create, :update, :destroy] + resources :users, :only => [:create] end end -- cgit v1.2.3