Commit 49ddd12c by Robert Pankowecki

Updated "Events" section in README to include example of hook for skipping post processing.

parent 9e389588
......@@ -259,6 +259,16 @@ _NOTE: Post processing will not even *start* if the attachment is not valid
according to the validations. Your callbacks and processors will *only* be
called with valid attachments._
class Message < ActiveRecord::Base
has_attached_file :asset, styles: {thumb: "100x100#"}
before_post_process :skip_for_audio
def skip_for_audio
return false if %w(audio/ogg application/ogg).include?(asset_content_type)
end
end
URI Obfuscation
---------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment