Sha256: d1183064113119e3cfa490e5f1fb40aba5773a943b23089b2e5581f36e186faf

Contents?: true

Size: 776 Bytes

Versions: 9

Compression:

Stored size: 776 Bytes

Contents

module Alchemy
  class PasswordsController < Devise::PasswordsController
    include Ferret::Search
    helper 'Alchemy::Admin::Base', 'Alchemy::Pages'

    before_filter { enforce_ssl if ssl_required? && !request.ssl? }
    before_filter :set_translation

    layout 'alchemy/login'

    def new
      build_resource(email: params[:email])
    end

  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_sign_in_path_for(resource_or_scope)
      if permitted_to?(:index, :alchemy_admin_dashboard)
        alchemy.admin_dashboard_path
      else
        alchemy.root_path
      end
    end

  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
alchemy_cms-2.8.3 app/controllers/alchemy/passwords_controller.rb
alchemy_cms-2.7.5 app/controllers/alchemy/passwords_controller.rb
alchemy_cms-2.7.4 app/controllers/alchemy/passwords_controller.rb
alchemy_cms-2.8.2 app/controllers/alchemy/passwords_controller.rb
alchemy_cms-2.8.1 app/controllers/alchemy/passwords_controller.rb
alchemy_cms-2.7.3 app/controllers/alchemy/passwords_controller.rb
alchemy_cms-2.7.2 app/controllers/alchemy/passwords_controller.rb
alchemy_cms-2.7.1 app/controllers/alchemy/passwords_controller.rb
alchemy_cms-2.7.0 app/controllers/alchemy/passwords_controller.rb