Module: Devise::Models::PasswordExpirable
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/devise/models/password_expirable.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
- #expire_password_after ⇒ Object
-
#need_change_password? ⇒ Boolean
is an password change required?.
Instance Method Details
#expire_password_after ⇒ Object
17 18 19 |
# File 'lib/devise/models/password_expirable.rb', line 17 def expire_password_after self.class.expire_password_after end |
#need_change_password? ⇒ Boolean
is an password change required?
9 10 11 12 13 14 15 |
# File 'lib/devise/models/password_expirable.rb', line 9 def need_change_password? if self.expire_password_after.is_a? Fixnum or self.expire_password_after.is_a? Float self.password_changed_at.nil? or self.password_changed_at < self.expire_password_after.ago else false end end |