Sha256: 433ffb46eb2c525b270cbf47dd57321a13429ec23acb538e7ba2e0b8d0ac2dfa

Contents?: true

Size: 409 Bytes

Versions: 1

Compression:

Stored size: 409 Bytes

Contents

# frozen_string_literal: true
module Mongoload
  module RelationsOptions
    MONGOLOAD_OPTIONS = [
      :auto_include,
      :fully_load
    ].freeze

    def validate!(options)
      options_clone = options.clone
      MONGOLOAD_OPTIONS.each { |key| options_clone.delete(key) }
      super(options_clone)
    end
  end
end

class << ::Mongoid::Relations::Options
  prepend ::Mongoload::RelationsOptions
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mongoload-0.0.3 lib/mongoload/patches/relations_options.rb