Exception: Mongoid::Errors::TooManyNestedAttributeRecords

Inherits:
MongoidError
  • Object
show all
Defined in:
lib/mongoid/errors/too_many_nested_attribute_records.rb

Overview

This error is raised when trying to create set nested documents above the specified :limit

Examples:

Create the error.

TooManyNestedAttributeRecords.new('association', limit)

Constant Summary

Constants inherited from MongoidError

MongoidError::BASE_KEY

Instance Attribute Summary

Attributes inherited from MongoidError

#problem, #resolution, #summary

Instance Method Summary collapse

Methods inherited from MongoidError

#compose_message

Constructor Details

#initialize(association, limit) ⇒ TooManyNestedAttributeRecords

Returns a new instance of TooManyNestedAttributeRecords.



13
14
15
16
17
18
19
20
# File 'lib/mongoid/errors/too_many_nested_attribute_records.rb', line 13

def initialize(association, limit)
  super(
    compose_message(
      "too_many_nested_attribute_records",
      { association: association, limit: limit }
    )
  )
end