Skip to content

Instantly share code, notes, and snippets.

@mattetti
Created September 7, 2008 14:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattetti/9260 to your computer and use it in GitHub Desktop.
Save mattetti/9260 to your computer and use it in GitHub Desktop.
class Client
include DataMapper::Resource
property :id, Integer, :serial => true
property :name, String
property :email, String
property :city, String, :lazy => true
property :zip_code, String, :field => 'postal_code', :lazy => true
property :phone, String, :lazy => true
property :address, String, :lazy => true
property :created_at, Date, :lazy => true
validates_present :name
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment