Exception: CouchObject::Errors::HasManyAssociationError

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

Overview

Is raised if a has_many relationship is poorly defined

Instance Method Summary collapse

Instance Method Details

#messageObject Also known as: to_s



51
52
53
# File 'lib/couch_object/error_classes.rb', line 51

def message
  "The has_many relationship hasn't been correctly defined. It should look something like: has_many :fruits. Make sure to also include a belongs_to relationship in the related classes that reference back to the has_many relationship. For example like this: belongs_to :fruit_basket, :as => :fruits"
end