Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

huh

  • Loading branch information...
commit 24f71c0cb93e8f5c4f3328d80f851d4042cb0070 1 parent 68fb6da
@suttree authored
Showing with 5 additions and 8 deletions.
  1. +5 −8 lib/delayed_paperclip/attachment.rb
View
13 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
Please sign in to comment.
Something went wrong with that request. Please try again.