Class: Devise::Models::PreviousPassword
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Devise::Models::PreviousPassword
- Defined in:
- lib/devise/secure_password/models/previous_password.rb
Instance Method Summary collapse
- #fresh?(minimum_age_duration, now = ::Time.zone.now) ⇒ Boolean
- #stale?(maximum_age_duration, now = ::Time.zone.now) ⇒ Boolean
Instance Method Details
#fresh?(minimum_age_duration, now = ::Time.zone.now) ⇒ Boolean
11 12 13 |
# File 'lib/devise/secure_password/models/previous_password.rb', line 11 def fresh?(minimum_age_duration, now = ::Time.zone.now) now <= (created_at + minimum_age_duration) end |
#stale?(maximum_age_duration, now = ::Time.zone.now) ⇒ Boolean
15 16 17 |
# File 'lib/devise/secure_password/models/previous_password.rb', line 15 def stale?(maximum_age_duration, now = ::Time.zone.now) now > (created_at + maximum_age_duration) end |