Sha256: ebed01f13c3eddae02a5526fd55505031b5032e3de296cff445e35ce1f07a041
Contents?: true
Size: 443 Bytes
Versions: 9
Compression:
Stored size: 443 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.get(user.id) user.destroy pp User.get(user.id)
Version data entries
9 entries across 9 versions & 1 rubygems