module ActiveAttr::Dirty

Public Instance Methods

attributes_and_changes() click to toggle source
# File lib/active_attr/dirty.rb, line 21
def attributes_and_changes
  attributes.select { |attr, key| changed.include? attr }
end
forget_attribute_assignments() click to toggle source
# File lib/active_attr/dirty.rb, line 30
def forget_attribute_assignments
  @attributes if defined?(@attributes)
end
mutations_from_database() click to toggle source
# File lib/active_attr/dirty.rb, line 25
def mutations_from_database
  #@mutations_from_database ||= ActiveModel::NullMutationTracker.instance
  @mutations_from_database ||= defined?(ActiveModel::ForcedMutationTracker) ? ActiveModel::ForcedMutationTracker.new(self) : ActiveModel::NullMutationTracker.instance
end