Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
class User
include DataMapper::Resource
property :id, Serial
property :name, String
property :age, Integer
property :created_at, DateTime
end
class User
include DataMapper::Resource
properties do
id Serial
name String
age Integer
created_at DateTime
end
end
class User
include DataMapper::Resource
properties do |p|
p.serial :id
p.string :name
p.integer :age
p.date_time :created_at
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment