Sha256: 3dc4d4af4ab2476e250ff38e5c34c029b53c653822ac0768ed95da038b1076e6
Contents?: true
Size: 861 Bytes
Versions: 16
Compression:
Stored size: 861 Bytes
Contents
# frozen_string_literal: true module Mongoid module Errors # Raised when an option provided for an association is invalid. class InvalidRelationOption < MongoidError # Create the new error. # # @example Create the new error. # InvalidRelationOption.new(Person, invalid_option: 'make_me_a_sandwich') # # @param [ Class ] klass The model class. # @param [ String | Symbol ] name The association name. # @param [ Symbol ] option The invalid option. # @param [ Array<Symbol> ] valid_options The valid option. def initialize(klass, name, option, valid_options) super( compose_message( "invalid_relation_option", { klass: klass, name: name, option: option, valid_options: valid_options } ) ) end end end end
Version data entries
16 entries across 16 versions & 1 rubygems