Exception: Mongoid::Errors::InvalidCollection
- Inherits:
-
MongoidError
- Object
- StandardError
- MongoidError
- Mongoid::Errors::InvalidCollection
- Defined in:
- lib/mongoid/errors/invalid_collection.rb
Overview
This error is raised when trying to access a Mongo::Collection from an embedded document.
Example:
InvalidCollection.new(Address)
Constant Summary
Constants inherited from MongoidError
Instance Method Summary collapse
-
#initialize(klass) ⇒ InvalidCollection
constructor
A new instance of InvalidCollection.
Methods inherited from MongoidError
Constructor Details
#initialize(klass) ⇒ InvalidCollection
Returns a new instance of InvalidCollection.
12 13 14 15 16 |
# File 'lib/mongoid/errors/invalid_collection.rb', line 12 def initialize(klass) super( translate("invalid_collection", { :klass => klass.name }) ) end |