Sha256: 43f2b2bb949280d00911c7b7d6c9a5e322565ed9b2cfb244fe90197ddbd34994

Contents?: true

Size: 350 Bytes

Versions: 3

Compression:

Stored size: 350 Bytes

Contents

require 'mongo_mapper'

::MongoMapper.connection = Mongo::Connection.new('127.0.0.1')
::MongoMapper.database = 'database_cleaner_test'

class Widget
  include MongoMapper::Document
  key :id, Integer
  key :name, String

  class << self
    #mongomapper doesn't seem to provide this...
    def create!(*args)
      new(*args).save!
    end
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
bitfluent-database_cleaner-0.5.2 examples/lib/mongomapper_models.rb
database_cleaner-0.5.2 examples/lib/mongomapper_models.rb
database_cleaner-0.5.1 examples/lib/mongomapper_models.rb