thoughtbot/paperclip — pull request #626 by kreynolds (2011-10-19 14:54:04+00:00)
Title: Slight refactor to the S3 storage to only establish a connection when required.

Much of the time, one only needs to interpolate an URL from an attachment and not actually perform an operation on it. In those cases, we don't need to establish an S3 connection. I added an establish_connection! method which gets called before it's needed in every operation for which it's required. Just interpolating S3 URLs is now 2-3x faster.