Sha256: 38db89f7e085b3e89f3a8e4acd5b28f53fd445ef975e2ea4c3147ce42fb99bf4
Contents?: true
Size: 916 Bytes
Versions: 11
Compression:
Stored size: 916 Bytes
Contents
require 'mongoid' Mongoid.configure do |config| name = 'database_cleaner_test' config.connect_to(name) end #::MongoMapper.connection = Mongo::Connection.new('127.0.0.1') #::MongoMapper.database = 'database_cleaner_test' class MongoidWidget include Mongoid::Document field :id, :type => Integer field :name class << self #mongoid doesn't seem to provide this... def create!(*args) new(*args).save! end end end class MongoidWidgetUsingDatabaseOne include Mongoid::Document field :id, :type => Integer field :name class << self #mongoid doesn't seem to provide this... def create!(*args) new(*args).save! end end end class MongoidWidgetUsingDatabaseTwo include Mongoid::Document field :id, :type => Integer field :name class << self #mongoid doesn't seem to provide this... def create!(*args) new(*args).save! end end end
Version data entries
11 entries across 6 versions & 2 rubygems