Skip to content

Instantly share code, notes, and snippets.

@slbug
Created June 3, 2011 14:00
Show Gist options
  • Save slbug/1006382 to your computer and use it in GitHub Desktop.
Save slbug/1006382 to your computer and use it in GitHub Desktop.
diff --git a/lib/carrierwave/uploader/processing.rb b/lib/carrierwave/uploader/processing.rb
index 7c37d5b..73994cd 100644
--- a/lib/carrierwave/uploader/processing.rb
+++ b/lib/carrierwave/uploader/processing.rb
@@ -8,7 +8,7 @@ module CarrierWave
include CarrierWave::Uploader::Callbacks
included do
- class_inheritable_accessor :processors, :instance_reader => false, :instance_writer => false
+ class_attribute :processors, :instance_writer => false
self.processors = []
after :cache, :process!
@@ -63,10 +63,10 @@ module CarrierWave
if arg.is_a?(Hash)
condition = arg.delete(:if)
arg.each do |method, args|
- processors.push([method, args, condition])
+ self.processors += [[method, args, condition]]
end
else
- processors.push([arg, [], nil])
+ self.processors += [[arg, [], nil]]
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment