Solutions Log

So I only have to figure things out once.

Image Upload and Display in Rails Using File_column

This is important:

just a note about using url_for_file_column inside an iteration

this won’t work:

<% for contact in @contacts %>
<%= image_tag url_for_file_column "contact", "picture", "thumb"  %>
<% end %>

this will:

<% for @contact in @contacts %>
<%= image_tag url_for_file_column "contact", "picture", "thumb"  %>
<% end %>

I don’t understand that, but it works.

The stuff about requiring adding stuff to environment.rb isn’t necessary.

I still haven’t configured it to upload where I want or to rename the files. But it’s working, by golly.

Comments