Created
December 28, 2011 04:21
-
-
Save lsiden/1526232 to your computer and use it in GitHub Desktop.
temporary solution to https://github.com/datamapper/dm-types/issues/26
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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