Sha256: e9098b4f080a5ae0680ad815b02c5970b52b74e7e93a2b34a985528f9626ae15

Contents?: true

Size: 622 Bytes

Versions: 20

Compression:

Stored size: 622 Bytes

Contents

class SessionsController < ::Devise::SessionsController
  layout 'login'

  before_filter :clear_unauthenticated_flash, :only => [:new]

  def create
    super
  rescue ::BCrypt::Errors::InvalidSalt, ::BCrypt::Errors::InvalidHash
    flash[:error] = t('password_encryption', :scope => 'users.forgot')
    redirect_to new_user_password_path
  end

protected
  # We don't like this alert.
  def clear_unauthenticated_flash
    if flash.keys.include?(:alert) and flash.values.any?{|v|
      ['unauthenticated', t('unauthenticated', :scope => 'devise.failure')].include?(v)
    }
      flash.delete(:alert)
    end
  end

end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
refinerycms-authentication-1.0.11 app/controllers/sessions_controller.rb
refinerycms-authentication-1.0.10 app/controllers/sessions_controller.rb
refinerycms-authentication-1.0.9 app/controllers/sessions_controller.rb
refinerycms-authentication-1.0.8 app/controllers/sessions_controller.rb
refinerycms-authentication-1.0.7 app/controllers/sessions_controller.rb
refinerycms-authentication-1.0.5 app/controllers/sessions_controller.rb
refinerycms-authentication-1.0.4 app/controllers/sessions_controller.rb
refinerycms-authentication-1.0.3 app/controllers/sessions_controller.rb
refinerycms-authentication-1.0.1 app/controllers/sessions_controller.rb
refinerycms-authentication-1.0.0 app/controllers/sessions_controller.rb
refinerycms-authentication-0.9.9.22 app/controllers/sessions_controller.rb
refinerycms-authentication-0.9.9.21 app/controllers/sessions_controller.rb
refinerycms-authentication-0.9.9.20 app/controllers/sessions_controller.rb
refinerycms-authentication-0.9.9.19 app/controllers/sessions_controller.rb
refinerycms-authentication-0.9.9.18 app/controllers/sessions_controller.rb
refinerycms-authentication-0.9.9.17 app/controllers/sessions_controller.rb
refinerycms-authentication-0.9.9.16 app/controllers/sessions_controller.rb
refinerycms-authentication-0.9.9.15 app/controllers/sessions_controller.rb
refinerycms-authentication-0.9.9.14 app/controllers/sessions_controller.rb
refinerycms-authentication-0.9.9.13 app/controllers/sessions_controller.rb