Exception: CouchObject::Errors::BelongsToAssociationError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/couch_object/error_classes.rb

Overview

Is raised if a belongs_to relationship is poorly defined

Instance Method Summary collapse

Instance Method Details

#messageObject Also known as: to_s



61
62
63
# File 'lib/couch_object/error_classes.rb', line 61

def message
  "The belongs_to relationship hasn't been properly defined. There are two required parameters: the name of the relation and the name of the corresponding has_many relation in the related class. Example: belongs_to :fruit_basket, :as => :fruits would be correct if the related class has it's relation defined as has_many :fruits"
end