Sha256: ce3a2c5799a666d36d5427b49f02d962421f0f7cecc64f9c0483fd884721b27f

Contents?: true

Size: 742 Bytes

Versions: 105

Compression:

Stored size: 742 Bytes

Contents

# encoding: utf-8
module Mongoid
  module Errors

    # Raised when invalid options are passed to a relation macro.
    class InvalidOptions < MongoidError

      # Instantiate the options error.
      #
      # @example Create the error.
      #   InvalidOptions.new(:name, :polymorphic, [ :as ])
      #
      # @param [ Symbol ] name The name of the relation.
      # @param [ Symbol ] invalid The invalid option.
      # @param [ Array<Symbol> ] valid The allowed options.
      #
      # @since 2.1.0
      def initialize(name, invalid, valid)
        super(
          compose_message(
            "invalid_options",
            { name: name, invalid: invalid, valid: valid.join(', ') }
          )
        )
      end
    end
  end
end

Version data entries

105 entries across 100 versions & 7 rubygems

Version Path
tdiary-5.0.8 vendor/bundle/gems/mongoid-6.4.0/lib/mongoid/errors/invalid_options.rb
mongoid-7.0.0 lib/mongoid/errors/invalid_options.rb
mongoid-6.4.0 lib/mongoid/errors/invalid_options.rb
mongoid-6.3.0 lib/mongoid/errors/invalid_options.rb
mongoid-6.2.1 lib/mongoid/errors/invalid_options.rb
mongoid-7.0.0.beta lib/mongoid/errors/invalid_options.rb
tdiary-5.0.5 vendor/bundle/gems/mongoid-6.1.0/lib/mongoid/errors/invalid_options.rb
tdiary-5.0.5 vendor/bundle/gems/mongoid-6.2.0/lib/mongoid/errors/invalid_options.rb
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/gems/mongoid-6.1.0/lib/mongoid/errors/invalid_options.rb
mongoid-6.2.0 lib/mongoid/errors/invalid_options.rb
mongoid-6.1.1 lib/mongoid/errors/invalid_options.rb
mongoid-5.2.1 lib/mongoid/errors/invalid_options.rb
tdiary-5.0.4 vendor/bundle/gems/mongoid-6.1.0/lib/mongoid/errors/invalid_options.rb
mongoid-6.1.0 lib/mongoid/errors/invalid_options.rb
mongoid-5.2.0 lib/mongoid/errors/invalid_options.rb
mongoid-5.2.0.rc0 lib/mongoid/errors/invalid_options.rb
mongoid-6.1.0.rc0 lib/mongoid/errors/invalid_options.rb
mongoid-6.0.3 lib/mongoid/errors/invalid_options.rb
mongoid-5.1.6 lib/mongoid/errors/invalid_options.rb
mongoid-6.0.2 lib/mongoid/errors/invalid_options.rb