Sha256: da6f94ea61084e347e595c12e6192a6df89115389fb0655f3f6a435c5560de29

Contents?: true

Size: 297 Bytes

Versions: 1

Compression:

Stored size: 297 Bytes

Contents

require 'mongoid/factory'

module RocketJob
  module Mongoid
    module Factory
      def from_db(*args)
        super(*args)
      rescue NameError
        RocketJob::Job.instantiate(attributes, selected_fields)
      end
    end
  end
end

::Mongoid::Factory.extend(RocketJob::Mongoid::Factory)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rocketjob-3.5.0 lib/rocket_job/extensions/mongoid/factory.rb