Skip to content

Instantly share code, notes, and snippets.

@lsiden
Created December 28, 2011 04:21
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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