summaryrefslogtreecommitdiff
path: root/users/config/routes.rb
diff options
context:
space:
mode:
authorazul <azul@riseup.net>2013-01-17 22:39:50 -0800
committerazul <azul@riseup.net>2013-01-17 22:39:50 -0800
commitc172c91d8041fbf85ec6b0054c30f31d41a1008b (patch)
treea6657e3f93ce6b529d34004b76919daad6ce6fd3 /users/config/routes.rb
parent6347fdbe0d932e78dfa8259bf81355edb19508e9 (diff)
parent1cf4cc5c8d571b571367a08f5e201be868289ed1 (diff)
Merge pull request #16 from leapcode/feature/fixing-routes-with-api
Fixing routes with api
Diffstat (limited to 'users/config/routes.rb')
-rw-r--r--users/config/routes.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/users/config/routes.rb b/users/config/routes.rb
index 8985502..0c2d8d9 100644
--- a/users/config/routes.rb
+++ b/users/config/routes.rb
@@ -1,8 +1,12 @@
Rails.application.routes.draw do
- scope "/1", :module => "V1", defaults: {format: 'json'} do
- resources :sessions, :only => [:new, :create, :update, :destroy]
- resources :users, :only => [:create]
+ constraints :subdomain => "api" do
+ namespace "api", { module: "V1",
+ path: "/1/",
+ defaults: {format: 'json'} } do
+ resources :sessions, :only => [:new, :create, :update, :destroy]
+ resources :users, :only => [:create]
+ end
end
get "login" => "sessions#new", :as => "login"