Skip to content

Instantly share code, notes, and snippets.

@mkristian
Created November 23, 2009 12:52
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/241055 to your computer and use it in GitHub Desktop.
Save mkristian/241055 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'dm-core'
require 'dm-serializer'
module X
class Name
include DataMapper::Resource
property :id, Serial
property :name, String
end
end
DataMapper.setup(:default, :adapter => :in_memory)
X::Name.create(:name => "1")
X::Name.create(:name => "2")
p X::Name.all.to_xml
module X
class Name
def self.name
"name"
end
def self.to_s
"name"
end
end
end
p X::Name.all.to_xml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment