Skip to content

Instantly share code, notes, and snippets.

@jpr5
Created Aug 16, 2010
Embed
What would you like to do?
# 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