Module: ActiveLdap::AttributeMethods::Dirty

Extended by:
ActiveSupport::Concern
Includes:
ActiveModel::Dirty
Defined in:
lib/active_ldap/attribute_methods/dirty.rb

Instance Method Summary collapse

Instance Method Details

#reloadObject

reload the record and clears changed attributes.



25
26
27
28
29
# File 'lib/active_ldap/attribute_methods/dirty.rb', line 25

def reload(*) #:nodoc:
  super.tap do
    clear_changes_information
  end
end

#saveObject

Attempts to +save+ the record and clears changed attributes if successful.



9
10
11
12
13
14
15
# File 'lib/active_ldap/attribute_methods/dirty.rb', line 9

def save(*) #:nodoc:
  succeeded = super
  if succeeded
    changes_applied
  end
  succeeded
end

#save!Object

Attempts to save! the record and clears changed attributes if successful.



18
19
20
21
22
# File 'lib/active_ldap/attribute_methods/dirty.rb', line 18

def save!(*) #:nodoc:
  super.tap do
    changes_applied
  end
end