Sha256: f01cbacec65771c747f842035ddd0993773be69b7e6a0610a3150ec14ab9a641

Contents?: true

Size: 755 Bytes

Versions: 9

Compression:

Stored size: 755 Bytes

Contents

# frozen_string_literal: true

module Mongoid
  module Errors

    # This error is raised when metadata could not be found when defining
    # nested attributes, or the name was incorrect.
    class NestedAttributesMetadataNotFound < MongoidError

      # Create the new metadata error.
      #
      # @example Create the new metadata error.
      #   NestedAttributesMetadataNotFound.new(klass, name)
      #
      # @param [ Class ] klass The class of the document.
      # @param [ Symbol, String ] name The name of the association
      def initialize(klass, name)
        super(
          compose_message(
            "nested_attributes_metadata_not_found",
            { klass: klass, name: name }
          )
        )
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
mongoid-7.5.4 lib/mongoid/errors/nested_attributes_metadata_not_found.rb
mongoid-7.5.3 lib/mongoid/errors/nested_attributes_metadata_not_found.rb
mongoid-7.5.2 lib/mongoid/errors/nested_attributes_metadata_not_found.rb
mongoid-7.5.1 lib/mongoid/errors/nested_attributes_metadata_not_found.rb
mongoid-7.4.3 lib/mongoid/errors/nested_attributes_metadata_not_found.rb
mongoid-8.0.1 lib/mongoid/errors/nested_attributes_metadata_not_found.rb
mongoid-7.5.0 lib/mongoid/errors/nested_attributes_metadata_not_found.rb
mongoid-7.4.1 lib/mongoid/errors/nested_attributes_metadata_not_found.rb
mongoid-7.4.0 lib/mongoid/errors/nested_attributes_metadata_not_found.rb