Sha256: e3ac5b9031bacbd088ae6a7a13c2f500094ffaf2f7db2c05f75e20d760c8fe6f

Contents?: true

Size: 822 Bytes

Versions: 5

Compression:

Stored size: 822 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
        if Clearance.configuration.allow_password_reset?
          resource :password,
            controller: 'clearance/passwords',
            only: [:edit, :update]
        end
      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

5 entries across 5 versions & 1 rubygems

Version Path
clearance-2.9.3 config/routes.rb
clearance-2.9.2 config/routes.rb
clearance-2.9.1 config/routes.rb
clearance-2.9.0 config/routes.rb
clearance-2.8.0 config/routes.rb