Rails - PaperClip & Acts_As_Versioned - Accessing a Photo URL

403 Views Asked by At

I've implemented the following:

File versioning in Ruby on Rails with Paperclip & acts_as_versioned: [http://eggsonbread.com/2009/07/23/file-versioning-in-ruby-on-rails-with-paperclip-acts_as_versioned/][1]

When you upload a new photo it is now successfully being version. The issue I'm having is that I can't grab the image with paperclip:

<% for version in @photos.first.versions.reverse %> 
<%= version.photo.inspect %>
<%= image_tag(version.photo.photo(:thumb)) %>
<% end %>

Which the "version.photo.inspect" shows the right info, when I call it in the image tag to show the photo, it's always showing the most recent version and not the older version.

Ideas?

0

There are 0 best solutions below