Bruno Sapienza
Bruno Sapienza

Reputation: 143

Paper clip - stored image path inside active admin

All the files uploaded by paper clip are beeing stored inside public/system/images/pictures/ and lots of 000/000/002 folders and etc.

I Want to use image_tag inside one active admin's view to print all the images related to one gallery. I can get the image object, and of course the image name, but how i figure out the right stored path?

Upvotes: 0

Views: 360

Answers (1)

jokklan
jokklan

Reputation: 3540

Just call url on the image object, like this:

<% @gallery.images.each do |image| %>
  <%= image_tag image.url %>
<% end %>

Upvotes: 1

Related Questions