Skip to content

Instantly share code, notes, and snippets.

@lpgauth
Created March 16, 2010 18:59
Show Gist options
  • Save lpgauth/334358 to your computer and use it in GitHub Desktop.
Save lpgauth/334358 to your computer and use it in GitHub Desktop.
--- a/vendor/plugins/paperclip/lib/paperclip.rb
+++ b/vendor/plugins/paperclip/lib/paperclip.rb
@@ -222,8 +222,8 @@ module Paperclip
after_save :save_attached_files
before_destroy :destroy_attached_files
- define_callbacks :before_post_process, :after_post_process
- define_callbacks :"before_#{name}_post_process", :"after_#{name}_post_process"
+ define_model_callbacks :post_process
+ define_model_callbacks :"#{name}_post_process"
define_method name do |*args|
a = attachment_for(name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment