Sha256: 723abb2e0f3e9d72258cc3d25f23457b3674b3c9f1fc22b3ab5c4eb397c43135
Contents?: true
Size: 410 Bytes
Versions: 14
Compression:
Stored size: 410 Bytes
Contents
require 'mongoid/factory' module RocketJob # Don't convert to Mongoid::Factory since it conflicts with Mongoid use. module MongoidFactory def from_db(klass, attributes = nil, criteria = nil) obj = super(klass, attributes, criteria) obj.collection_name = criteria.collection_name if criteria obj end end end ::Mongoid::Factory.extend(RocketJob::MongoidFactory)
Version data entries
14 entries across 14 versions & 1 rubygems