Sha256: 8b25b473128d1a42495f8052185732c92d341c40e1b7a0190910d164a99fedb2

Contents?: true

Size: 756 Bytes

Versions: 25

Compression:

Stored size: 756 Bytes

Contents

if Clearance.configuration.routes_enabled?
  Rails.application.routes.draw do
    resources :passwords,
      controller: 'clearance/passwords',
      only: [:create, :new]

    resource :session,
      controller: 'clearance/sessions',
      only: [:create]

    resources :users,
      controller: 'clearance/users',
      only: Clearance.configuration.user_actions do
        resource :password,
          controller: 'clearance/passwords',
          only: [:create, :edit, :update]
      end

    get '/sign_in' => 'clearance/sessions#new', as: 'sign_in'
    delete '/sign_out' => 'clearance/sessions#destroy', as: 'sign_out'

    if Clearance.configuration.allow_sign_up?
      get '/sign_up' => 'clearance/users#new', as: 'sign_up'
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
clearance-2.0.0 config/routes.rb
clearance-2.0.0.beta2 config/routes.rb
clearance-2.0.0.beta1 config/routes.rb
clearance-1.17.0 config/routes.rb
clearance-1.16.2 config/routes.rb
clearance-1.16.1 config/routes.rb
clearance-1.16.0 config/routes.rb
clearance-1.15.1 config/routes.rb
clearance-1.15.0 config/routes.rb
clearance-1.14.2 config/routes.rb
clearance-1.14.1 config/routes.rb
clearance-1.14.0 config/routes.rb
clearance-1.13.0 config/routes.rb
clearance-1.12.1 config/routes.rb
clearance-1.12.0 config/routes.rb
clearance-1.11.0 config/routes.rb
clearance-1.10.1 config/routes.rb
clearance-1.9.0 config/routes.rb
clearance-1.8.1 config/routes.rb
clearance-1.8.0 config/routes.rb