Supports the forcing of processing to happen

This is useful in the event that an image failed to process
This commit is contained in:
Robin Liao
2012-09-08 18:14:35 -07:00
parent bbe05ae3fa
commit 16f887185f

View File

@@ -48,8 +48,8 @@ class Upload < ActiveRecord::Base
end
module ConversionMethods
def process!
return if status =~ /processing|completed|error/
def process! force=false
return if !force && status =~ /processing|completed|error/
CurrentUser.scoped(uploader, uploader_ip_addr) do
update_attribute(:status, "processing")
@@ -304,4 +304,4 @@ class Upload < ActiveRecord::Base
def presenter
@presenter ||= UploadPresenter.new(self)
end
end
end