Module: Devise::Models::Compatibility::MongoidPatch
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/devise-security/models/compatibility/mongoid_patch.rb
Instance Method Summary collapse
-
#update_attribute_without_validatons_or_callbacks(name, value) ⇒ Object
Updates the document with the value and does not trigger validations or callbacks.
-
#will_save_change_to_email? ⇒ Boolean
Will saving this record change the
email
attribute?. -
#will_save_change_to_encrypted_password? ⇒ Boolean
Will saving this record change the
encrypted_password
attribute?.
Instance Method Details
#update_attribute_without_validatons_or_callbacks(name, value) ⇒ Object
Updates the document with the value and does not trigger validations or callbacks
26 27 28 |
# File 'lib/devise-security/models/compatibility/mongoid_patch.rb', line 26 def update_attribute_without_validatons_or_callbacks(name, value) set(Hash[name, value]) end |
#will_save_change_to_email? ⇒ Boolean
Will saving this record change the email
attribute?
13 14 15 |
# File 'lib/devise-security/models/compatibility/mongoid_patch.rb', line 13 def will_save_change_to_email? changed.include? 'email' end |
#will_save_change_to_encrypted_password? ⇒ Boolean
Will saving this record change the encrypted_password
attribute?
19 20 21 |
# File 'lib/devise-security/models/compatibility/mongoid_patch.rb', line 19 def will_save_change_to_encrypted_password? changed.include? 'encrypted_password' end |