Sha256: 6b7f0ae2cbffbdb0b77515b2e112efd4f70cfb640dd1c2b0c9f6814b69c06cdc
Contents?: true
Size: 446 Bytes
Versions: 2
Compression:
Stored size: 446 Bytes
Contents
require 'pp' require 'pathname' require 'rubygems' require 'adapter/mongo' root_path = Pathname(__FILE__).dirname.join('..').expand_path lib_path = root_path.join('lib') $:.unshift(lib_path) require 'toystore' class User include Toy::Store adapter :mongo, Mongo::Connection.new.db('adapter')['testing'] attribute :name, String end user = User.create(:name => 'John') pp user pp User.read(user.id) user.destroy pp User.read(user.id)
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
toystore-0.13.2 | examples/mongo.rb |
toystore-0.13.1 | examples/mongo.rb |