Categorized: Rails
Image upload and display in Rails using file_column
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
Nothing to see here yet. Start things off, why don't you?
What do you think about that?