I am building a app for trading books where a user lists books that
they want to trade and those then want to get.
I have a Book model with title, author and condition as attributes.
The "condition" attribute (good, fair, poor) is set by the user for
the books they have to trade when the item is listed. This attribute
is not set for books that a user is looking to get. A "list" method
displays all the books as follows:
<% for column in Book.content_columns %>
<b><%= column.human_name %>:</b> <%=h @book.send(column.name) %>
<% end %>
What I am looking for is a way NOT to display the "condition" field
when dealing with books that I "want" but not for the other. What's a
good way to do that in the view in the "for" loop above?
Thanks, Roupen N.