Sebastian K. wrote:
Regarding your question: If your model is stored in an instance (!)
variable “@foo” and your file_column is called “image”, then you can
use it like this:
<%= url_for_file_column “foo”, “image” %>
Thanks Sebastian, I solved this with some help on irc. However, maybe
I’m missing something basic, but I didn’t understand this part: I want
to list all the images as thumbnails in the list.rhtml.
This works:
<% for @contact in @contacts %>
<%=h @contact.name %> |
<%=h @contact.address %> |
<%= image_tag url_for_file_column "contact", "picture", "thumb"
%>
|
<% end %>
But this throws a nil error. Why?
<% for contact in @contacts %>
<%=h contact.name %> |
<%=h contact.address %> |
<%= image_tag url_for_file_column "contact", "picture", "thumb"
%>
|
<% end %>
TIA,
Vamsee.