diff --git a/lib/tasks/paperclip.rake b/lib/tasks/paperclip.rake index fc8ab0541..bca5f6121 100644 --- a/lib/tasks/paperclip.rake +++ b/lib/tasks/paperclip.rake @@ -47,7 +47,7 @@ namespace :paperclip do Paperclip.each_instance_with_attachment(klass, name) do |instance| if file = instance.send(name).to_file(:original) instance.send("#{name}_file_name=", instance.send("#{name}_file_name").strip) - instance.send("#{name}_content_type=", file.content_type.strip) + instance.send("#{name}_content_type=", file.content_type.to_s.strip) instance.send("#{name}_file_size=", file.size) if instance.respond_to?("#{name}_file_size") if Rails.version >= "3.0.0" instance.save(:validate => false)