Created
August 16, 2010 21:26
-
-
Save jpr5/527777 to your computer and use it in GitHub Desktop.
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
# The default DM property doesn't support serials, so we add it in here | |
module DataMapper | |
class Property | |
class String | |
accept_options :serial | |
end | |
end | |
end | |
module DataMapper::Salesforce | |
class Property | |
class SFSerial < DataMapper::Property::String | |
primitive ::String | |
length 15 | |
serial true | |
def self.dump(value, property) | |
value[0..14] unless value.blank? | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment