Created
February 15, 2010 03:46
-
-
Save tadman/304406 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Force checking of /opt path for OS X macports binaries | |
if (File.exist?('/opt/local/bin/identify')) | |
Paperclip.options[:command_path] = '/opt/local/bin' | |
end | |
# Monkeypatch to get thumbnails working by allowing proper chaining | |
class Paperclip::Attachment | |
def callback(which) | |
# For some reason this inverts the boolean value result and halts | |
# the processing chain for no apparent reason. result is typically nil | |
# unless user-defined callbacks have been defined. | |
instance.run_callbacks(which, @queued_for_write){ |result, obj| result } | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment