Sha256: 28c191a2b4d27f1f83576b906a423cefaeafa0692e51c8f2945a6a2f28e866cb
Contents?: true
Size: 892 Bytes
Versions: 29
Compression:
Stored size: 892 Bytes
Contents
# frozen_string_literal: true module Mongoid module Errors # This error is raised when trying to create a field that has an invalid # option. class InvalidFieldOption < MongoidError # Create the new error. # # @example Create the error. # InvalidFieldOption.new(Model, :name, :localized, [ :localize ]) # # @param [ Class ] klass The document class. # @param [ Symbol ] name The method name. # @param [ Symbol ] option The option name. # @param [ Array<Symbol> ] valid All the valid options. def initialize(klass, name, option, valid) super( compose_message( "invalid_field_option", { name: name, klass: klass, option: option, valid: valid.join(", ") } ) ) end end end end
Version data entries
29 entries across 29 versions & 1 rubygems