Skip to content

Commit

Permalink
set processing to false instead of nil
Browse files Browse the repository at this point in the history
  • Loading branch information
mockdeep committed May 14, 2014
1 parent 505a4d0 commit f7d060f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/backgrounder/workers/process_asset.rb
Expand Up @@ -10,7 +10,7 @@ def perform(*args)
if record
record.send(:"process_#{column}_upload=", true)
if record.send(:"#{column}").recreate_versions! && record.respond_to?(:"#{column}_processing")
record.update_attribute :"#{column}_processing", nil
record.update_attribute :"#{column}_processing", false
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/backgrounder/workers/store_asset.rb
Expand Up @@ -12,7 +12,7 @@ def perform(*args)
store_directories(record)
record.send :"process_#{column}_upload=", true
record.send :"#{column}_tmp=", nil
record.send :"#{column}_processing=", nil if record.respond_to?(:"#{column}_processing")
record.send :"#{column}_processing=", false if record.respond_to?(:"#{column}_processing")
File.open(cache_path) { |f| record.send :"#{column}=", f }
if record.save!
FileUtils.rm_r(tmp_directory, :force => true)
Expand Down
2 changes: 1 addition & 1 deletion spec/backgrounder/workers/process_asset_spec.rb
Expand Up @@ -29,7 +29,7 @@

it 'processes versions with image_processing column' do
user.expects(:respond_to?).with(:image_processing).once.returns(true)
user.expects(:update_attribute).with(:image_processing, nil).once
user.expects(:update_attribute).with(:image_processing, false).once
worker.perform
end

Expand Down

0 comments on commit f7d060f

Please sign in to comment.