fixed upload tests

This commit is contained in:
albert
2011-08-23 18:33:27 -04:00
parent 4265408581
commit ebee1eb665
4 changed files with 5 additions and 3 deletions

View File

@@ -260,7 +260,7 @@ class Upload < ActiveRecord::Base
self.file_path = temp_file_path
if file.tempfile
if file.respond_to?(:tempfile) && file.tempfile
FileUtils.cp(file.tempfile.path, file_path)
else
File.open(file_path, 'wb') do |out|