Exception: Mongoid::Errors::InvalidEstimatedCountCriteria

Inherits:
MongoidError
  • Object
show all
Defined in:
build/mongoid-7.3/lib/mongoid/errors/invalid_estimated_count_criteria.rb

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(class_name) ⇒ InvalidEstimatedCountCriteria

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Creates the exception raised when trying to call estimated_count on a filtered criteria.

Parameters:

  • class_name (String)

    The klass of the criteria used to call estimated count.



16
17
18
19
20
21
22
23
# File 'build/mongoid-7.3/lib/mongoid/errors/invalid_estimated_count_criteria.rb', line 16

def initialize(class_name)
  super(
    compose_message(
      "invalid_estimated_count_criteria",
      { class_name: class_name }
    )
  )
end