module LoadWithOriginalAttributes
Public Instance Methods
load(attributes, _remove_root = false, persisted = false)
click to toggle source
After sending to the API the object is reloaded with its attributes The persisted flag tells us it has been saved
Calls superclass method
# File lib/esp/extensions/active_resource/dirty.rb, line 33 def load(attributes, _remove_root = false, persisted = false) if persisted super.tap do |object| object.original_attributes = object.attributes end else super end end