module Dirty

Public Instance Methods

changed_attributes() click to toggle source
# File lib/esp/extensions/active_resource/dirty.rb, line 10
def changed_attributes
  attributes.select do |key, value|
    next if value == original_attributes[key]
    true
  end
end
original_attributes() click to toggle source
# File lib/esp/extensions/active_resource/dirty.rb, line 2
def original_attributes
  @original_attributes ||= {}.with_indifferent_access
end
original_attributes=(attributes = {}) click to toggle source
# File lib/esp/extensions/active_resource/dirty.rb, line 6
def original_attributes=(attributes = {})
  @original_attributes = attributes.dup
end