Module: Devise::Models::Expirable
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/devise/expirable/model.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
- #active_for_authentication? ⇒ Boolean
- #inactive_message ⇒ Object
- #password_expirate_in ⇒ Object
- #password_expired? ⇒ Boolean
- #password_still_valid? ⇒ Boolean
Instance Method Details
#active_for_authentication? ⇒ Boolean
16 17 18 |
# File 'lib/devise/expirable/model.rb', line 16 def active_for_authentication? password_still_valid? && super end |
#inactive_message ⇒ Object
30 31 32 |
# File 'lib/devise/expirable/model.rb', line 30 def password_expired? ? :password_expired : super end |
#password_expirate_in ⇒ Object
12 13 14 |
# File 'lib/devise/expirable/model.rb', line 12 def password_expirate_in self.class.password_expirate_in end |
#password_expired? ⇒ Boolean
26 27 28 |
# File 'lib/devise/expirable/model.rb', line 26 def password_expired? !password_still_valid? end |
#password_still_valid? ⇒ Boolean
20 21 22 23 24 |
# File 'lib/devise/expirable/model.rb', line 20 def password_still_valid? return false unless expiration_password_at expiration_password_at >= Time.current end |