Permalink
Browse files

huh

  • Loading branch information...
suttree committed Dec 19, 2012
1 parent 68fb6da commit 24f71c0cb93e8f5c4f3328d80f851d4042cb0070
Showing with 5 additions and 8 deletions.
  1. +5 −8 lib/delayed_paperclip/attachment.rb
@@ -41,20 +41,17 @@ def process_delayed!
self.post_processing = true
reprocess!
self.job_is_processing = false
- end
-
- def after_flush_writes_with_processing(*args)
- after_flush_writes_without_processing(*args)
-
- # update_column is available in rails 3.1 instead we can do this to update the attribute without callbacks
-
- #instance.update_column("#{name}_processing", false) if instance.respond_to?(:"#{name}_processing?")
+
if instance.respond_to?(:"#{name}_processing?")
instance.send("#{name}_processing=", false)
instance.class.update_all({ "#{name}_processing" => false }, instance.class.primary_key => instance.id)
end
end
+ def after_flush_writes_with_processing(*args)
+ after_flush_writes_without_processing(*args)
+ end
+
def save_with_prepare_enqueueing
was_dirty = @dirty
save_without_prepare_enqueueing.tap do

0 comments on commit 24f71c0

Please sign in to comment.