Sha256: 7d384e424c5654f51e6fe05d0cb25d5ed78f2f13d97add52fa28c22f52681fa9

Contents?: true

Size: 665 Bytes

Versions: 5

Compression:

Stored size: 665 Bytes

Contents

module Alchemy
  class PasswordsController < ::Devise::PasswordsController
    include Locale

    before_action { enforce_ssl if ssl_required? && !request.ssl? }

    helper 'Alchemy::Admin::Base', 'Alchemy::Pages'

    layout 'alchemy/login'

    private

    # Override for Devise method
    def new_session_path(resource_name)
      alchemy.login_path
    end

    def edit_password_url(resource, options={})
      alchemy.edit_password_url(options)
    end

    def after_resetting_password_path_for(resource)
      if can? :index, :alchemy_admin_dashboard
        alchemy.admin_dashboard_path
      else
        alchemy.root_path
      end
    end

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
alchemy-devise-2.1.0 app/controllers/alchemy/passwords_controller.rb
alchemy-devise-2.1.0.beta3 app/controllers/alchemy/passwords_controller.rb
alchemy-devise-2.1.0.beta2 app/controllers/alchemy/passwords_controller.rb
alchemy-devise-2.1.0.beta1 app/controllers/alchemy/passwords_controller.rb
alchemy-devise-2.0.0 app/controllers/alchemy/passwords_controller.rb