Comments on: 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/?utm_source=rss&utm_medium=rss&utm_campaign=file-versioning-in-ruby-on-rails-with-paperclip-acts_as_versioned Simple and delicious. Sun, 01 Mar 2015 12:30:00 +0000 hourly 1 By: Will Koehler http://eggsonbread.com/2009/07/23/file-versioning-in-ruby-on-rails-with-paperclip-acts_as_versioned/comment-page-1/#comment-6753 Mon, 31 Oct 2011 01:11:40 +0000 http://eggsonbread.com/?p=120#comment-6753 There’s a new option that tells paperclip to preserve old attachments:

https://github.com/thoughtbot/paperclip/commit/65e8d4f6de50732d8e1b
https://github.com/thoughtbot/paperclip/issues/60

Simple to use:

has_attached_file => :attachment,
:styles => { :thumb => 100×100! },
:preserve_files => true

It’s not document yet and took some digging to find so I wanted to share it here.

]]>
By: Philippe Creux http://eggsonbread.com/2009/07/23/file-versioning-in-ruby-on-rails-with-paperclip-acts_as_versioned/comment-page-1/#comment-1464 Thu, 04 Nov 2010 13:41:44 +0000 http://eggsonbread.com/?p=120#comment-1464 Hey Brett,

The patch hasn’t been updated since then. My change where put together in this commit. Check it out, you might apply the same changes to the latestversion of paperclip. :)

]]>
By: Brett http://eggsonbread.com/2009/07/23/file-versioning-in-ruby-on-rails-with-paperclip-acts_as_versioned/comment-page-1/#comment-1455 Wed, 03 Nov 2010 23:51:41 +0000 http://eggsonbread.com/?p=120#comment-1455 How do you actually show the image of a previous version? Doing “image_tag(version.photo.photo(:thumb))” always shows the most recent version. thanks

]]>
By: Brett http://eggsonbread.com/2009/07/23/file-versioning-in-ruby-on-rails-with-paperclip-acts_as_versioned/comment-page-1/#comment-1421 Mon, 01 Nov 2010 20:38:39 +0000 http://eggsonbread.com/?p=120#comment-1421 Great post! Is this Rails 3 friendly. Also, has this been updated with all the latest paper_clip updates?

]]>
By: Philippe Creux http://eggsonbread.com/2009/07/23/file-versioning-in-ruby-on-rails-with-paperclip-acts_as_versioned/comment-page-1/#comment-335 Tue, 12 Jan 2010 14:54:35 +0000 http://eggsonbread.com/?p=120#comment-335 Check the line 5 of the code sample above.

:keep_old_files => :version_condition_met?

]]>
By: Imtiaz Ahmed http://eggsonbread.com/2009/07/23/file-versioning-in-ruby-on-rails-with-paperclip-acts_as_versioned/comment-page-1/#comment-333 Mon, 11 Jan 2010 19:35:11 +0000 http://eggsonbread.com/?p=120#comment-333 How do you use this

set the option keep_old_files to true when a new version get saved
Where do we update the keeps_old_file

]]>
By: Philippe Creux http://eggsonbread.com/2009/07/23/file-versioning-in-ruby-on-rails-with-paperclip-acts_as_versioned/comment-page-1/#comment-218 Thu, 12 Nov 2009 04:29:45 +0000 http://eggsonbread.com/?p=120#comment-218 Hey Andy,

that’s great. Happy to know it helped you.

Cheers

]]>
By: andy http://eggsonbread.com/2009/07/23/file-versioning-in-ruby-on-rails-with-paperclip-acts_as_versioned/comment-page-1/#comment-188 Thu, 05 Nov 2009 05:25:15 +0000 http://eggsonbread.com/?p=120#comment-188 Hi Phillipe,

I pull your changes into my fork of paperclip and pushed it to gemcutter as “paperclip_with_versions”

“http://gemcutter.org/gems/paperclip_with_versions”

Don’t mean to step on your toes here, but we needed this gem’d for our project mgmt.

I used your example and got this working with acts-as-audited.

Thanks

]]>
By: Philippe Creux http://eggsonbread.com/2009/07/23/file-versioning-in-ruby-on-rails-with-paperclip-acts_as_versioned/comment-page-1/#comment-170 Fri, 30 Oct 2009 17:14:50 +0000 http://eggsonbread.com/?p=120#comment-170 Hey Andy, I requested a pull back into Paperclip a while ago. I gonna request again. I also saw this Paperclip fork while working on mine – I guess this comment just stayed in my mind. :)

]]>
By: andy http://eggsonbread.com/2009/07/23/file-versioning-in-ruby-on-rails-with-paperclip-acts_as_versioned/comment-page-1/#comment-164 Wed, 28 Oct 2009 23:51:07 +0000 http://eggsonbread.com/?p=120#comment-164 also, have you seen this Paperclip fork?

http://github.com/alainravet/paperclip/commit/0943fa3a82447329ebaff4ae217a77fe8236dadb

he does the same feature, differently – not sure which approach is better

oddly, you both added the same comment to ‘lib/paperclip.rb’ – how did that happen?

]]>