Exception: Mongoid::Errors::TooManyNestedAttributeRecords

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

Overview

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

Example:

<tt>TooManyNestedAttributeRecords.new(‘association’, limit)

Constant Summary

Constants inherited from MongoidError

MongoidError::BASE_KEY

Instance Method Summary collapse

Methods inherited from MongoidError

#translate

Constructor Details

#initialize(association, limit) ⇒ TooManyNestedAttributeRecords

Returns a new instance of TooManyNestedAttributeRecords.



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

def initialize(association, limit)
  super(
    translate(
      "too_many_nested_attribute_records",
      { :association => association, :limit => limit }
    )
  )
end