Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
paperclip
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ikcrm_common
paperclip
Commits
49ddd12c
Commit
49ddd12c
authored
Mar 02, 2012
by
Robert Pankowecki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated "Events" section in README to include example of hook for skipping post processing.
parent
9e389588
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
README.md
+10
-0
No files found.
README.md
View file @
49ddd12c
...
@@ -259,6 +259,16 @@ _NOTE: Post processing will not even *start* if the attachment is not valid
...
@@ -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
according to the validations. Your callbacks and processors will
*only*
be
called with valid attachments._
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
URI Obfuscation
---------------
---------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment