Exception: Mongoid::SleepingKingStudios::HasTree::Errors::MissingAncestor
- Inherits:
-
Error
- Object
- StandardError
- Error
- Mongoid::SleepingKingStudios::HasTree::Errors::MissingAncestor
- Defined in:
- lib/mongoid/sleeping_king_studios/has_tree/errors.rb
Overview
Instance Method Summary collapse
-
#initialize(relation_name, ancestor_id) ⇒ MissingAncestor
constructor
A new instance of MissingAncestor.
Constructor Details
#initialize(relation_name, ancestor_id) ⇒ MissingAncestor
Returns a new instance of MissingAncestor.
9 10 11 12 13 14 |
# File 'lib/mongoid/sleeping_king_studios/has_tree/errors.rb', line 9 def initialize relation_name, ancestor_id = Array === ancestor_id ? "#{relation_name.to_s.pluralize} with ids" : "#{relation_name.to_s.singularize} with id" super "unable to find #{} #{ancestor_id.inspect}" end |