paperclip

https://github.com/thoughtbot/paperclip

Ruby

Easy file attachment management for ActiveRecord

Paperclip::Attachment#reprocess!

This method really shouldn't be called that often. Its expected use is
in the paperclip:refresh rake task and that's it. It will regenerate all
thumbnails forcefully, by reobtaining the original file and going through
the post-process again.
NOTE: Calling reprocess WILL NOT delete existing files. This is due to
inconsistencies in timing of S3 commands. It's possible that calling
#reprocess! will lose data if the files are not kept.

Source | Google | Stack overflow

Edit

git clone [email protected]:thoughtbot/paperclip.git

cd paperclip

open lib/paperclip/attachment.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Paperclip--Attachment-reprocess--for-pr


# Commit to git

git add lib/paperclip/attachment.rbgit commit -m "better docs for Paperclip::Attachment#reprocess!"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Paperclip--Attachment-reprocess--for-pr

hub pull-request


# Celebrate!