Browse files

rails 3.0.3 compatibility

  • Loading branch information...
1 parent 78b1971 commit b8f0747924ab22d7f543cafe9ff790ebf2ded037 @solnic solnic committed Nov 17, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/dm-paperclip/attachment.rb
View
2 lib/dm-paperclip/attachment.rb
@@ -85,7 +85,7 @@ def assign uploaded_file
instance_write(:file_size, uploaded_file['size'] ? uploaded_file['size'].to_i : uploaded_file['tempfile'].size.to_i)
instance_write(:updated_at, Time.now)
else
- @queued_for_write[:original] = uploaded_file.to_tempfile
+ @queued_for_write[:original] = uploaded_file.tempfile
instance_write(:file_name, uploaded_file.original_filename.strip.gsub(/[^\w\d\.\-]+/, '_'))
instance_write(:content_type, uploaded_file.content_type.to_s.strip)
instance_write(:file_size, uploaded_file.size.to_i)

0 comments on commit b8f0747

Please sign in to comment.