lib/paperclip/storage.rb in thoughtbot-paperclip-2.2.0 vs lib/paperclip/storage.rb in thoughtbot-paperclip-2.2.1
- old
+ new
@@ -36,14 +36,14 @@
alias_method :to_io, :to_file
def flush_writes #:nodoc:
logger.info("[paperclip] Writing files for #{name}")
@queued_for_write.each do |style, file|
+ file.close
FileUtils.mkdir_p(File.dirname(path(style)))
logger.info("[paperclip] -> #{path(style)}")
FileUtils.mv(file.path, path(style))
FileUtils.chmod(0644, path(style))
- file.close
end
@queued_for_write = {}
end
def flush_deletes #:nodoc: