Better sign up and sign in

This commit is contained in:
2014-09-29 16:11:59 +02:00
parent 7e34e47a99
commit 3b5651de47
9 changed files with 60 additions and 30 deletions
+6 -2
View File
@@ -207,8 +207,12 @@ Qwaiter::Application.routes.draw do
#
#root :to => 'dashboard#home'
root :to => 'pages#home', defaults: {locale: 'nl'}
get '/:locale' => 'pages#home', constraints: {locale: /nl|be|de|fr|en/}
scope '(/:locale)', constraints: {locale: /nl|be|de|fr|en/}, defaults: { locale: 'nl' } do
ALLOWED_LOCALES = /nl|be|de|fr|en/
get '/:locale' => 'pages#home', constraints: {locale: ALLOWED_LOCALES}
devise_scope :supplier do
get '/:locale/suppliers/sign_up' => 'registrations#new', constraints: {locale: ALLOWED_LOCALES}
end
scope '(/:locale)', constraints: {locale: ALLOWED_LOCALES}, defaults: { locale: 'nl' } do
get "/:name" => "pages#show", constraints: {name: /.*/}, as: :go_to
end