Sha256: b23550ef3b2623c4331cf5e6d4433ab0b5a8ccce98c684512718e0fb2be854c4

Contents?: true

Size: 733 Bytes

Versions: 2

Compression:

Stored size: 733 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] : []
    resource :users, 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

2 entries across 2 versions & 1 rubygems

Version Path
authenticate-0.2.1 config/routes.rb
authenticate-0.2.0 config/routes.rb