Sha256: a6f9d26ce55528e9d214140333a9cae635fa2f535908b348429402d8db8d1bbb
Contents?: true
Size: 832 Bytes
Versions: 27
Compression:
Stored size: 832 Bytes
Contents
# frozen_string_literal: true # encoding: utf-8 module Mongoid module Errors # Raised when no inverse_of definition can be found when needed. class InverseNotFound < MongoidError # Create then new error. # # @example Create the new error. # InverseNotFound.new(Town, :citizens, Person, :town_id) # # @param [ Class ] base The base class. # @param [ Symbol ] name The name of the association. # @param [ Class ] klass The child class. # @param [ Symbol ] inverse The attempted inverse key. # # @since 3.0.0 def initialize(base, name, klass, inverse) super( compose_message( "inverse_not_found", { base: base, name: name, klass: klass, inverse: inverse } ) ) end end end end
Version data entries
27 entries across 27 versions & 2 rubygems