paperclip
https://github.com/thoughtbot/paperclip
Ruby
Easy file attachment management for ActiveRecord
Paperclip::Tempfile#make_tmpname
Due to how ImageMagick handles its image format conversion and how Tempfile handles its naming scheme, it is necessary to override how Tempfile makes # its names so as to allow for file extensions. Idea taken from the comments on this blog post: http://marsorange.com/archives/of-mogrify-ruby-tempfile-dynamic-class-definitions This is Ruby 1.9.3's implementation.
Edit
git clone [email protected]:thoughtbot/paperclip.git
cd paperclip
open lib/paperclip/tempfile.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Paperclip--Tempfile-make_tmpname-for-pr
# Commit to gitgit add lib/paperclip/tempfile.rbgit commit -m "better docs for Paperclip::Tempfile#make_tmpname"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Paperclip--Tempfile-make_tmpname-for-pr
hub pull-request
# Celebrate!