Skip to content

Instantly share code, notes, and snippets.

@krobertson
Created April 14, 2010 05:41
Show Gist options
  • Save krobertson/365481 to your computer and use it in GitHub Desktop.
Save krobertson/365481 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'dm-core'
require 'dm-timestamps'
DataMapper.setup(:default, "sqlite3:///#{Dir.pwd}/test.db")
class User
include DataMapper::Resource
property :id, Serial
property :name, String
timestamps :at
end
DataMapper.auto_migrate!
user = User.new(:name => 'test1')
user.save
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment