paperclip

https://github.com/thoughtbot/paperclip

Ruby

Easy file attachment management for ActiveRecord

Paperclip::TempfileEncoding#binmode

This overrides Tempfile#binmode to make sure that the extenal encoding
for binary mode is ASCII-8BIT. This behavior is what's in CRuby, but not
in JRuby

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--TempfileEncoding-binmode-for-pr


# Commit to git

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


# 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--TempfileEncoding-binmode-for-pr

hub pull-request


# Celebrate!