Browse Source

Merge pull request #9 from johnmichaelbradley/master

Changed :notice to :error when setting flash message on attempt failure.
for_activeadmin
Dmitrii Golub 12 years ago
parent
commit
3e2c020d08
  1. 2
      app/controllers/devise/two_factor_authentication_controller.rb
  2. 2
      config/locales/en.yml

2
app/controllers/devise/two_factor_authentication_controller.rb

@ -16,7 +16,7 @@ class Devise::TwoFactorAuthenticationController < DeviseController
else
resource.second_factor_attempts_count += 1
resource.save
set_flash_message :notice, :attempt_failed
set_flash_message :error, :attempt_failed
if resource.max_login_attempts?
sign_out(resource)
render :template => 'devise/two_factor_authentication/max_login_attempts_reached' and return

2
config/locales/en.yml

@ -1,4 +1,4 @@
en:
devise:
two_factor_authentication:
attempt_failed: "Attemp failed"
attempt_failed: "Attempt failed."

Loading…
Cancel
Save