lib/devise/orm/data_mapper/compatibility.rb in dm-devise-2.1.0 vs lib/devise/orm/data_mapper/compatibility.rb in dm-devise-2.2.0

- old
+ new

@@ -51,21 +51,29 @@ def update_attributes(*args) update(*args) end + def assign_attributes(params, *options) + self.attributes = params + end + def invalid? !valid? end def email_changed? - attribute_dirty?(:email) + attribute_dirty?(:email) && self.email.present? end + def encrypted_password_changed? + attribute_dirty?(:email) && self.encrypted_password.present? + end + def email_was original_attributes[:email] end - + # Redefine properties_to_serialize in models for more secure defaults. # By default, it removes from the serializable model all attributes that # are *not* accessible. You can remove this default by using :force_exclude # and passing a new list of attributes you want to exempt. All attributes # given to :exclude will simply add names to exempt to Devise internal list.