Skip to content
Browse files

minor change to reduce unneeded saves after processing

  • Loading branch information...
1 parent df6ef41 commit ab2b0745f7f077cf23c5ab03bf59254b690f04a7 @joshk joshk committed Mar 1, 2010
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/delayed/paperclip.rb
View
3 lib/delayed/paperclip.rb
@@ -35,7 +35,8 @@ def process_in_background(name)
end
define_method "#{name}_processed!" do
- return true unless self.respond_to?(:"#{name}_processing?")
+ return true unless self.respond_to?(:"#{name}_processing?") &&
+ self.send("#{name}_processing?")
self.send("#{name}_processing=", false)
self.save(false)
end

0 comments on commit ab2b074

Please sign in to comment.
Something went wrong with that request. Please try again.