summaryrefslogtreecommitdiff
path: root/config/routes.rb
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2016-10-20 14:39:33 +0200
committerAzul <azul@riseup.net>2016-10-20 14:39:33 +0200
commitb97daaed9b513006ace7e8eb5232a2211e965e77 (patch)
treee27002e8368e92410e5d4af2a945260c2ea6e2d1 /config/routes.rb
parentc6c4d9fd10b8ca8e24889112727e44c9bf68dd60 (diff)
parent6eb2dae802e5453e2a4361ab28f614cce9294f4c (diff)
Merge remote-tracking branch 'origin/develop'
We'll only use the master branch for development from now on.
Diffstat (limited to 'config/routes.rb')
-rw-r--r--config/routes.rb16
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