Skip to content

Instantly share code, notes, and snippets.

@lsiden
Created December 28, 2011 04:21
Show Gist options
  • Save lsiden/1526232 to your computer and use it in GitHub Desktop.
Save lsiden/1526232 to your computer and use it in GitHub Desktop.
# modified from https://gist.github.com/763374
module DataMapper
module Resource
def taint! property
self.persistence_state = PersistenceState::Dirty.new(self) \
unless self.persistence_state.kind_of?(PersistenceState::Dirty)
self.persistence_state.original_attributes[properties[property]] = Object.new
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment