my problem is kind of difficult to explain but maybe simple to answer: I
have a model (book) with author:string, title:string, id:integer and so
If I do a query @book = Book.find(:id => 123) the result is an instance
Now I want to iterate through the key/value pairs of this instance, but
as it is not a hash methods like “each” don’t work.
<% @book.each do |k,v|%>
<% end %>
Can anyone please point me to the right direction?
Thanks and greetings