Sha256: 7ff017b2ae51d5b8b979397e32a6e26b732d8fa14768b3c6400946cb24638a16

Contents?: true

Size: 666 Bytes

Versions: 105

Compression:

Stored size: 666 Bytes

Contents

# encoding: utf-8
module Mongoid
  module Errors

    # This error is raised when a bad configuration option is attempted to be
    # set.
    class InvalidConfigOption < MongoidError

      # Create the new error.
      #
      # @example Create the new error.
      #   InvalidConfigOption.new(:name, [ :option ])
      #
      # @param [ Symbol, String ] name The attempted config option name.
      #
      # @since 3.0.0
      def initialize(name)
        super(
          compose_message(
            "invalid_config_option",
            { name: name, options: Config.settings.keys.map(&:inspect).join(", ") }
          )
        )
      end
    end
  end
end

Version data entries

105 entries across 100 versions & 7 rubygems

Version Path
mongoid-7.0.13 lib/mongoid/errors/invalid_config_option.rb
mongoid-7.0.12 lib/mongoid/errors/invalid_config_option.rb
mongoid-6.4.8 lib/mongoid/errors/invalid_config_option.rb
mongoid-7.0.11 lib/mongoid/errors/invalid_config_option.rb
mongoid-7.0.10 lib/mongoid/errors/invalid_config_option.rb
mongoid-6.4.7 lib/mongoid/errors/invalid_config_option.rb
mongoid-6.4.5 lib/mongoid/errors/invalid_config_option.rb
mongoid-7.0.8 lib/mongoid/errors/invalid_config_option.rb
mongoid-7.0.7 lib/mongoid/errors/invalid_config_option.rb
mongoid-7.0.6 lib/mongoid/errors/invalid_config_option.rb
mongoid-5.4.1 lib/mongoid/errors/invalid_config_option.rb
mongoid-7.0.5 lib/mongoid/errors/invalid_config_option.rb
mongoid-7.0.4 lib/mongoid/errors/invalid_config_option.rb
mongoid-6.4.4 lib/mongoid/errors/invalid_config_option.rb
mongoid-7.0.3 lib/mongoid/errors/invalid_config_option.rb
mongoid-6.4.2 lib/mongoid/errors/invalid_config_option.rb
mongoid-7.0.2 lib/mongoid/errors/invalid_config_option.rb
mongoid-7.0.1 lib/mongoid/errors/invalid_config_option.rb
mongoid-6.4.1 lib/mongoid/errors/invalid_config_option.rb
mongoid-5.4.0 lib/mongoid/errors/invalid_config_option.rb