diff options
author | NavaL <ayoyo@thoughtworks.com> | 2016-07-14 15:44:07 +0200 |
---|---|---|
committer | NavaL <ayoyo@thoughtworks.com> | 2016-07-14 15:44:07 +0200 |
commit | e3c2cb91dfef5c39c608b967e702e9de977d1bd2 (patch) | |
tree | 154dc28dd986bd6e0a48e933c5da46994ffaa0cb /config/routes.rb | |
parent | e2f19bcfb6dbce77746c2d61715340525b29a592 (diff) | |
parent | f09e6ec1337962ab279f021a6a6d0ff30479ebe0 (diff) |
Merge branch 'develop' of https://github.com/leapcode/leap_web into feature/expose_admin_in_api
Diffstat (limited to 'config/routes.rb')
-rw-r--r-- | config/routes.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/config/routes.rb b/config/routes.rb index e370aa4..b152c9c 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -10,8 +10,8 @@ LeapWeb::Application.routes.draw do # HTTP Error Handling # instead of the default error pages use the errors controller and views # - match '/404' => 'errors#not_found' - match '/500' => 'errors#server_error' + match '/404' => 'errors#not_found', via: [:get, :post] + match '/500' => 'errors#server_error', via: [:get, :post] scope "(:locale)", :locale => CommonLanguages.match_available, :controller => 'pages', :action => 'show' do get 'privacy-policy', :as => 'privacy_policy' @@ -24,10 +24,10 @@ LeapWeb::Application.routes.draw do get '/provider.json' => 'static_config#provider' - namespace "api", { module: "v1", - path: "/1/", - defaults: {format: 'json'}, - :constraints => { :id => /[^\/]+(?=\.json\z)|[^\/]+/ } + namespace "api", { module: "api", + path: "/:version/", + defaults: {version: '2', format: 'json'}, + :constraints => { :id => /[^\/]+(?=\.json\z)|[^\/]+/, :version => /[12]/ } } do resources :sessions, :only => [:new, :create, :update] delete "logout" => "sessions#destroy", :as => "logout" @@ -44,8 +44,8 @@ LeapWeb::Application.routes.draw do get "login" => "sessions#new", :as => "login" delete "logout" => "sessions#destroy", :as => "logout" - get "signup" => "users#new", :as => "signup" - resources :users, :except => [:create, :update] do + get "signup" => "account#new", :as => "signup" + resources :users, :except => [:new, :create, :update] do # resource :email_settings, :only => [:edit, :update] # resources :email_aliases, :only => [:destroy], :id => /.*/ post 'deactivate', on: :member |