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