Sha256: 2ea5b3c76cd5b599bf9bb9155f62b25d2ea967513beab6fead6b4abbc2b58977
Contents?: true
Size: 458 Bytes
Versions: 2
Compression:
Stored size: 458 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
toystore-0.6.3 | examples/mongo.rb |
toystore-0.6.2 | examples/mongo.rb |