This week's book giveaway is in the Artificial Intelligence and Machine Learning forum.
We're giving away four copies of Succeeding with AI and have Veljko Krunic on-line!
See this thread for details.
Win a copy of Succeeding with AI this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Junilu Lacar
Sheriffs:
  • Tim Cooke
  • Jeanne Boyarsky
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • fred rosenberger
  • Frits Walraven

Model definition using couchDB (or other NoSQL DB)

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
snakes are really good at eating slugs. And you wouldn't think it, but so are tiny ads:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic