-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathroutes.rb
19 lines (16 loc) · 856 Bytes
/
routes.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
if Authenticate.configuration.routes_enabled?
Rails.application.routes.draw do
resource :session, controller: 'authenticate/sessions', only: [:create, :new, :destroy]
resources :passwords, controller: 'authenticate/passwords', only: [:new, :create]
user_model = Authenticate.configuration.user_model_route_key
user_actions = Authenticate.configuration.allow_sign_up? ? [:create] : []
resource user_model, controller: 'authenticate/users', only: user_actions do
resources :passwords, controller: 'authenticate/passwords', only: [:edit, :update]
end
get '/sign_in', to: 'authenticate/sessions#new', as: 'sign_in'
get '/sign_out', to: 'authenticate/sessions#destroy', as: 'sign_out'
if Authenticate.configuration.allow_sign_up?
get '/sign_up', to: 'authenticate/users#new', as: 'sign_up'
end
end
end