Sha256: ffeb9eb2ba5d1d38f487c804db1ef7ad6434e4d85cd2541cf8ab82fbb5ec9021
Contents?: true
Size: 450 Bytes
Versions: 12
Compression:
Stored size: 450 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, selected_fields = nil) obj = super(klass, attributes, criteria, selected_fields) obj.collection_name = criteria.collection_name if criteria obj end end end ::Mongoid::Factory.extend(RocketJob::MongoidFactory)
Version data entries
12 entries across 12 versions & 1 rubygems