Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Commit

Permalink
Updated "Events" section in README to include example of hook for ski…
Browse files Browse the repository at this point in the history
…pping post processing.
  • Loading branch information
paneq committed Mar 1, 2012
1 parent 9e38958 commit 49ddd12
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Expand Up @@ -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
---------------

Expand Down

0 comments on commit 49ddd12

Please sign in to comment.