Sha256: 788e8292bba434fd1d1a7b999c20344e6bcf3abd65a2264a02c6db0177bc3f78

Contents?: true

Size: 862 Bytes

Versions: 1

Compression:

Stored size: 862 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_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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
authenticate-0.7.1 config/routes.rb