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.

Source | Google | Stack overflow

Edit

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

cd paperclip

open lib/paperclip/tempfile.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Paperclip--Tempfile-make_tmpname-for-pr


# Commit to git

git add lib/paperclip/tempfile.rbgit commit -m "better docs for Paperclip::Tempfile#make_tmpname"


# 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--Tempfile-make_tmpname-for-pr

hub pull-request


# Celebrate!