Sha256: 78ea56957c2018940fda6e654bab11cff024af125d5acf39cbd575a527d5d8a7

Contents?: true

Size: 660 Bytes

Versions: 18

Compression:

Stored size: 660 Bytes

Contents

# frozen_string_literal: true

module Mongoid
  module Errors

    # Raised when options provided to :store_in are invalid.
    class InvalidStorageOptions < MongoidError

      # Create the new error.
      #
      # @example Create the new error.
      #   InvalidStorageOptions.new(Person, invalid_option: 'name')
      #
      # @param [ Class ] klass The model class.
      # @param [ Hash | String | Symbol ] options The provided options.
      def initialize(klass, options)
        super(
          compose_message(
            "invalid_storage_options",
            { klass: klass, options: options }
          )
        )
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
mongoid-8.1.9 lib/mongoid/errors/invalid_storage_options.rb
mongoid-8.0.9 lib/mongoid/errors/invalid_storage_options.rb
mongoid-8.1.8 lib/mongoid/errors/invalid_storage_options.rb
mongoid-8.1.7 lib/mongoid/errors/invalid_storage_options.rb
mongoid-8.1.6 lib/mongoid/errors/invalid_storage_options.rb
mongoid-8.0.8 lib/mongoid/errors/invalid_storage_options.rb
mongoid-8.1.5 lib/mongoid/errors/invalid_storage_options.rb
mongoid-8.1.4 lib/mongoid/errors/invalid_storage_options.rb
mongoid-8.0.7 lib/mongoid/errors/invalid_storage_options.rb
mongoid-8.1.3 lib/mongoid/errors/invalid_storage_options.rb
mongoid-8.1.2 lib/mongoid/errors/invalid_storage_options.rb
mongoid-8.0.6 lib/mongoid/errors/invalid_storage_options.rb
mongoid-8.1.1 lib/mongoid/errors/invalid_storage_options.rb
mongoid-8.0.5 lib/mongoid/errors/invalid_storage_options.rb
mongoid-8.1.0 lib/mongoid/errors/invalid_storage_options.rb
mongoid-8.0.4 lib/mongoid/errors/invalid_storage_options.rb
mongoid-8.0.3 lib/mongoid/errors/invalid_storage_options.rb
mongoid-8.0.2 lib/mongoid/errors/invalid_storage_options.rb