Skip to content

Commit

Permalink
Revert "Don't store file inside transaction"
Browse files Browse the repository at this point in the history
In carrierwave 2.0, files are no longer stored in the transaction, meaning this workaround is no longer necessary (see carrierwaveuploader/carrierwave#2209)

This reverts commit 10a2744.
  • Loading branch information
fschwahn committed Dec 17, 2019
1 parent f918a4d commit e031ebb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion carrierwave_backgrounder.gemspec
Expand Up @@ -17,7 +17,7 @@ Gem::Specification.new do |s|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
s.require_paths = ["lib"]

s.add_dependency "carrierwave", [">= 0.5", "< 2.1"]
s.add_dependency "carrierwave", "~> 2.0"
s.add_dependency "mime-types"

s.add_development_dependency "rspec", ["~> 3.5.0"]
Expand Down
4 changes: 1 addition & 3 deletions lib/backgrounder/jobs/store_asset_job.rb
Expand Up @@ -12,9 +12,7 @@ def perform(*args)
record.send :"#{column}_cache=", record.send(:"#{column}_tmp")
record.send :"#{column}_tmp=", nil
record.send :"#{column}_processing=", false if record.respond_to?(:"#{column}_processing")
record.send :"write_#{column}_identifier"
record.send :"store_#{column}!"
record.save(validate: false)
record.save!
else
when_not_ready
end
Expand Down

0 comments on commit e031ebb

Please sign in to comment.