Sha256: 4da251e8206d9b622102b2cce6ff91cc062e4e67537d1b1b657f256d3a3216c9

Contents?: true

Size: 802 Bytes

Versions: 11

Compression:

Stored size: 802 Bytes

Contents

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_actions = Authenticate.configuration.allow_sign_up? ? [:new, :create] : []
    user_model = Authenticate.configuration.user_model_route_key
    resource user_model, controller: 'authenticate/users', only: user_actions do
      resources :passwords, controller: 'authenticate/passwords', only: [:edit, :update]
    end

    get '/sign_up', to: 'authenticate/users#new', as: 'sign_up'
    get '/sign_in', to: 'authenticate/sessions#new', as: 'sign_in'
    get '/sign_out', to: 'authenticate/sessions#destroy', as: 'sign_out'
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
authenticate-0.7.0 config/routes.rb
authenticate-0.6.1 config/routes.rb
authenticate-0.6.0 config/routes.rb
authenticate-0.5.0 config/routes.rb
authenticate-0.4.0 config/routes.rb
authenticate-0.3.3 config/routes.rb
authenticate-0.3.2 config/routes.rb
authenticate-0.3.1 config/routes.rb
authenticate-0.3.0 config/routes.rb
authenticate-0.2.3 config/routes.rb
authenticate-0.2.2 config/routes.rb