Sha256: ea4618faa29dc9554777d6712a2a4c048c8c81d516035ab023e1b1d8c9caaf2f
Contents?: true
Size: 459 Bytes
Versions: 4
Compression:
Stored size: 459 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 store :mongo, Mongo::Connection.new.db('adapter')['testing'] key(:object_id) attribute :name, String end user = User.create(:name => 'John') pp user pp User.get(user.id) user.destroy pp User.get(user.id)
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
toystore-0.7.0 | examples/mongo.rb |
toystore-0.6.6 | examples/mongo.rb |
toystore-0.6.5 | examples/mongo.rb |
toystore-0.6.4 | examples/mongo.rb |