Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated "Events" section in README to include example of hook for ski…

…pping post processing.
  • Loading branch information...
commit 49ddd12cc2583bc4781ac29bc1019e3ff810abd5 1 parent 9e38958
@paneq paneq authored
Showing with 10 additions and 0 deletions.
  1. +10 −0 README.md
View
10 README.md
@@ -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
---------------
Please sign in to comment.
Something went wrong with that request. Please try again.