lib/mongoid/errors/invalid_relation_option.rb in mongoid-7.0.13 vs lib/mongoid/errors/invalid_relation_option.rb in mongoid-7.1.0.rc0

- old
+ new

@@ -1,18 +1,20 @@ +# frozen_string_literal: true # encoding: utf-8 + module Mongoid module Errors - # Raised when an option provided for a relation is invalid. + # 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 relation name. + # @param [ String, Symbol ] name The association name. # @param [ Symbol ] option The invalid option. # @param [ Array<Symbol> ] valid_options The valid option. # # @since 3.0.0 def initialize(klass, name, option, valid_options)