thoughtbot/paperclip — pull request #755 by mkremer (2012-02-26 11:50:00+00:00)
Title: Specify default options in Rails 3.x configuration, README updated

This pull requests offers the ability to configure defaults per environment using the Rails 3 configuration as discussed on https://github.com/thoughtbot/paperclip/issues/585 and https://github.com/socialreferral/paperclip-defaults/issues/1.

The solution in itself is quite simple as it simply merges in whatever you've configured in Rails into Paperclip::Attachment.default_options as your Rails application boots (this making use of the already existing mechanism for defaults on your attachments).

I've updated the README to indicate how you can set defaults both through the Rails configuration and through Paperclip::Attachment.default_options.

I've not added in tests for this behavior as it would require the Rails boot process in place, and that would have a significant impact on the Paperclip test suite. If anybody has an idea on how to test this in a lightweight manner I'd surely appreciate suggestions.