thoughtbot/paperclip — pull request #628 by momolog (2011-10-20 11:06:28+00:00)
Title: Allow for lambda in s3_permissions

This patch adds the ability to specify per-instance s3_permissions.
You need this if some of your attachments need different permissions than others based on some properties of the object they are attached to.

Usage is like:
:s3_permissions => lambda { |attachment, style| attachment.instance.enhanced_security? ? :private : :public_read }

Tests are attached.
While we added this we also fixed some errors in the s3_test.rb, specifically the wrong usage of permissions "public-read" and "private" where it should be :public_read and :private