Skip to content

Instantly share code, notes, and snippets.

@mkristian
Created November 23, 2009 05:50
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 mkristian/240907 to your computer and use it in GitHub Desktop.
Save mkristian/240907 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'dm-core'
require 'date'
class Name
include DataMapper::Resource
property :id, Serial
property :time, DateTime
end
DataMapper.setup(:default, :adapter => :yaml, :path => "tmp")
n = Name.create(:time => DateTime.now)
p n.time.class
p Name.get(n.id).time.class
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment