Permalink
Browse files

Fix #947 copying attachments between models should succeed when the a…

…ttachment is empty
  • Loading branch information...
1 parent a394c73 commit b256381c3215fe80aaa1be892410982ab3b965af @tamc tamc committed with sikachu Jul 4, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/paperclip/io_adapters/nil_adapter.rb
@@ -30,5 +30,5 @@ def eof?
end
Paperclip.io_adapters.register Paperclip::NilAdapter do |target|
- target.nil?
+ target.nil? || ( (Paperclip::Attachment === target) && !target.present? )
end

0 comments on commit b256381

Please sign in to comment.