Sha256: 104434e760c8e3067c1c47a7ac9eee853dfef720a312a140f133360afae14d1d

Contents?: true

Size: 792 Bytes

Versions: 76

Compression:

Stored size: 792 Bytes

Contents

# 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 relation.
      # @param [ Class ] 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

76 entries across 72 versions & 7 rubygems

Version Path
tdiary-5.0.5 vendor/bundle/gems/mongoid-6.1.0/lib/mongoid/errors/inverse_not_found.rb
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/gems/mongoid-6.1.0/lib/mongoid/errors/inverse_not_found.rb
mongoid-5.2.1 lib/mongoid/errors/inverse_not_found.rb
tdiary-5.0.4 vendor/bundle/gems/mongoid-6.1.0/lib/mongoid/errors/inverse_not_found.rb
mongoid-6.1.0 lib/mongoid/errors/inverse_not_found.rb
mongoid-5.2.0 lib/mongoid/errors/inverse_not_found.rb
mongoid-5.2.0.rc0 lib/mongoid/errors/inverse_not_found.rb
mongoid-6.1.0.rc0 lib/mongoid/errors/inverse_not_found.rb
mongoid-6.0.3 lib/mongoid/errors/inverse_not_found.rb
mongoid-5.1.6 lib/mongoid/errors/inverse_not_found.rb
mongoid-6.0.2 lib/mongoid/errors/inverse_not_found.rb
mongoid-6.0.1 lib/mongoid/errors/inverse_not_found.rb
mongoid-5.1.5 lib/mongoid/errors/inverse_not_found.rb
mongoid-6.0.0 lib/mongoid/errors/inverse_not_found.rb
mongoid-5.1.4 lib/mongoid/errors/inverse_not_found.rb
mongoid-6.0.0.rc0 lib/mongoid/errors/inverse_not_found.rb
mongoid-6.0.0.beta lib/mongoid/errors/inverse_not_found.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/mongoid-5.1.3/lib/mongoid/errors/inverse_not_found.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/mongoid-4.0.2/lib/mongoid/errors/inverse_not_found.rb
mongoid-5.1.3 lib/mongoid/errors/inverse_not_found.rb