Sha256: 13fb0a4f104179218e39362f9bd957b7e9e008f3feb5789b648a2ddb629b041e
Contents?: true
Size: 719 Bytes
Versions: 3
Compression:
Stored size: 719 Bytes
Contents
module Refinery class SessionsController < Devise::SessionsController layout 'refinery/layouts/login' before_filter :clear_unauthenticated_flash, :only => [:new] def create super rescue ::BCrypt::Errors::InvalidSalt, ::BCrypt::Errors::InvalidHash flash[:error] = t('password_encryption', :scope => 'refinery.users.forgot') redirect_to refinery.new_refinery_user_password_path end protected # We don't like this alert. def clear_unauthenticated_flash if flash.keys.include?(:alert) and flash.any?{|k, v| ['unauthenticated', t('unauthenticated', :scope => 'devise.failure')].include?(v) } flash.delete(:alert) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems