Browse Source

ActiveSupport::Concern deprecation warnings

for_activeadmin
Carlos Vilhena 13 years ago
parent
commit
81fea21391
  1. 24
      lib/two_factor_authentication/models/two_factor_authenticatable.rb

24
lib/two_factor_authentication/models/two_factor_authenticatable.rb

@ -8,22 +8,20 @@ module Devise
::Devise::Models.config(self, :login_code_random_pattern, :max_login_attempts)
end
module InstanceMethods
def need_two_factor_authentication?
true
end
def need_two_factor_authentication?
true
end
def generate_two_factor_code
self.class.login_code_random_pattern.gen
end
def generate_two_factor_code
self.class.login_code_random_pattern.gen
end
def send_two_factor_authentication_code(code)
p "Code is #{code}"
end
def send_two_factor_authentication_code(code)
p "Code is #{code}"
end
def max_login_attempts?
second_factor_attempts_count >= self.class.max_login_attempts
end
def max_login_attempts?
second_factor_attempts_count >= self.class.max_login_attempts
end
end
end

Loading…
Cancel
Save