Exception: CouchObject::Errors::HasOneAssociationError

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

Overview

Is raised if a has_one relationship is poorly defined

Instance Method Summary collapse

Instance Method Details

#messageObject Also known as: to_s



71
72
73
# File 'lib/couch_object/error_classes.rb', line 71

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