Sha256: dc4e0c3b57c5deb4d5c55f1136862849082bb9599baefbb79a02be06e8f54d2f

Contents?: true

Size: 349 Bytes

Versions: 3

Compression:

Stored size: 349 Bytes

Contents

require 'mongomapper'

::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 & 3 rubygems

Version Path
jonrowe-database_cleaner-0.5.2 examples/lib/mongomapper_models.rb
saimonmoore-database_cleaner-0.5.0 examples/lib/mongomapper_models.rb
database_cleaner-0.5.0 examples/lib/mongomapper_models.rb