Skip to content
This repository was archived by the owner on Jan 30, 2024. It is now read-only.

Commit 76d61fe

Browse files
committed
replace Fixnum references
1 parent b2ee978 commit 76d61fe

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

lib/devise_security_extension/models/password_archivable.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def validate_password_archive
1616

1717
# validate is the password used in the past
1818
def password_archive_included?
19-
unless deny_old_passwords.is_a? Fixnum
19+
unless deny_old_passwords.is_a? Integer
2020
if deny_old_passwords.is_a? TrueClass and archive_count > 0
2121
self.deny_old_passwords = archive_count
2222
else

lib/devise_security_extension/models/password_expirable.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ module PasswordExpirable
1313

1414
# is an password change required?
1515
def need_change_password?
16-
if self.expire_password_after.is_a? Fixnum or self.expire_password_after.is_a? Float
16+
if self.expire_password_after.is_a? Integer or self.expire_password_after.is_a? Float
1717
self.password_changed_at.nil? or self.password_changed_at < self.expire_password_after.seconds.ago
1818
else
1919
false
@@ -22,15 +22,15 @@ def need_change_password?
2222

2323
# set a fake datetime so a password change is needed and save the record
2424
def need_change_password!
25-
if self.expire_password_after.is_a? Fixnum or self.expire_password_after.is_a? Float
25+
if self.expire_password_after.is_a? Integer or self.expire_password_after.is_a? Float
2626
need_change_password
2727
self.save(:validate => false)
2828
end
2929
end
3030

3131
# set a fake datetime so a password change is needed
3232
def need_change_password
33-
if self.expire_password_after.is_a? Fixnum or self.expire_password_after.is_a? Float
33+
if self.expire_password_after.is_a? Integer or self.expire_password_after.is_a? Float
3434
self.password_changed_at = self.expire_password_after.seconds.ago
3535
end
3636

@@ -39,7 +39,7 @@ def need_change_password
3939

4040
self.password_changed_at
4141
end
42-
42+
4343
def expire_password_after
4444
self.class.expire_password_after
4545
end

0 commit comments

Comments
 (0)