Sha256: ba8018a300aab7e8c6e4e96a4aa9fee6b0be3e6b0b0d812f20cc3e757b8d884d

Contents?: true

Size: 273 Bytes

Versions: 3

Compression:

Stored size: 273 Bytes

Contents

require 'mongoid/factory'

module RocketJob
  module MongoidFactory
    def from_db(*args)
      super(*args)
    rescue NameError => exc
      RocketJob::Job.instantiate(attributes, selected_fields)
    end
  end
end

::Mongoid::Factory.include(RocketJob::MongoidFactory)

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rocketjob-3.4.3 lib/rocket_job/extensions/mongoid/factory.rb
rocketjob-3.4.2 lib/rocket_job/extensions/mongoid/factory.rb
rocketjob-3.4.1 lib/rocket_job/extensions/mongoid/factory.rb