wood burning stoves 2.0*
The moose likes Ruby and the fly likes Model definition using couchDB (or other NoSQL DB) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Languages » Ruby
Bookmark "Model definition using couchDB (or other NoSQL DB)" Watch "Model definition using couchDB (or other NoSQL DB)" New topic
Author

Model definition using couchDB (or other NoSQL DB)

Paulo Carvalho
Ranch Hand

Joined: Nov 12, 2008
Posts: 57
Hello

I am writing a RoR application which connects to a noSQL database
(couchDB).


In the database, I have an author document. The author has a first_name
and a last_name. It also have inside another document: a book. The book
has a title and a year of publication.

Example:


I am trying to define the Author model file so I can access Author's
information as so related book information:



However, when in the HTML file I try to access to the book author's
information, I get errors.

HTML example:



The error I get is:
undefined method `title' for :book:Symbol


It's the first time I am developing a RoR application using a CouchDB
application, so I am pretty sure that the problem comes from the way I
am defining the Author's model file.

Can anyone help me about that?

Thank you
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Model definition using couchDB (or other NoSQL DB)