Dirty
Attribute and object level dirty checking with rollback support
Timeline
class Example < AllFutures::Base
attribute :name, :string
attribute :age, :integer, default: 21
end
example = Example.new
puts example.name # => nil
puts example.age # => 21Tracking
Forest or Trees
Instance methods
attribute_change(attribute), attribute_changed?(attribute)
attribute_present?(attribute)
attribute_previous_change(attribute), attribute_previously_changed?(attribute)
attribute_previously_was(attribute)
attribute_was(attribute)
attribute_will_change!(attribute), attribute_will_change?(attribute)
changed
changed_attributes, changed_attributes?
changes
changes_applied
clear_attribute_change(attribute), clear_attribute_changes(Array)
clear_changes_information
dirty?
previous_attributes
previous_changes, previous_changes?
restore_attribute(attribute)
restore_attributes(Array = changed)
rollback_attribute(attribute), rollback_attribute!(attribute)
rollback_attributes(Array = changed), rollback_attributes!(Array = changed)
saved_changes, saved_changes?
Per-attribute instance methods
ATTR?
ATTR_change, ATTR_changed?
ATTR_previous_change, ATTR_previously_changed?
ATTR_previously_was
ATTR_was
ATTR_will_change!, ATTR_will_change?
clear_ATTR_change
restore_ATTR
rollback_ATTR, rollback_ATTR!
Last updated