Exception: Mongoid::Errors::InvalidEstimatedCountCriteria

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

Overview

This error is raised when trying to call estimated_count on a filtered criteria.

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.

Parameters:

  • class_name (String)

    The name of the criteria class used to call estimated count.



17
18
19
20
21
22
23
24
# File 'lib/mongoid/errors/invalid_estimated_count_criteria.rb', line 17

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