lib/joint.rb in joint-0.5 vs lib/joint.rb in joint-0.5.1
- old
+ new
@@ -47,10 +47,10 @@
nil_attachments << :#{name}
assigned_attachments.delete(:#{name})
else
send("#{name}_id=", BSON::ObjectId.new) if send("#{name}_id").nil?
send("#{name}_size=", File.size(file))
- send("#{name}_type=", Wand.wave(file.path))
+ send("#{name}_type=", Wand.wave(file.path, :original_filename => Joint.file_name(file)))
send("#{name}_name=", Joint.file_name(file))
assigned_attachments[:#{name}] = file
nil_attachments.delete(:#{name})
end
end