Browse Source

Updates deprecated Devise methods

master
amoose 9 years ago
parent
commit
8908b47113
No known key found for this signature in database
GPG Key ID: 179854651E5444A1
  1. 2
      app/controllers/devise/two_factor_authentication_controller.rb
  2. 2
      spec/support/controller_helper.rb

2
app/controllers/devise/two_factor_authentication_controller.rb

@ -33,7 +33,7 @@ class Devise::TwoFactorAuthenticationController < DeviseController
end end
warden.session(resource_name)[TwoFactorAuthentication::NEED_AUTHENTICATION] = false warden.session(resource_name)[TwoFactorAuthentication::NEED_AUTHENTICATION] = false
sign_in resource_name, resource, :bypass => true bypass_sign_in(resource, scope: resource_name)
set_flash_message :notice, :success set_flash_message :notice, :success
resource.update_attribute(:second_factor_attempts_count, 0) resource.update_attribute(:second_factor_attempts_count, 0)

2
spec/support/controller_helper.rb

@ -7,7 +7,7 @@ module ControllerHelper
end end
RSpec.configure do |config| RSpec.configure do |config|
config.include Devise::TestHelpers, type: :controller config.include Devise::Test::ControllerHelpers, type: :controller
config.include ControllerHelper, type: :controller config.include ControllerHelper, type: :controller
config.before(:example, type: :controller) do config.before(:example, type: :controller) do

Loading…
Cancel
Save