fixed set_attachment_attr

works with CouchDB 0.10.0

* use "content_type" instead of "content-type"
* do not encode attachment

Signed-off-by: Marcos Tapajós <tapajos@gmail.com>
This commit is contained in:
Johannes J. Schmidt 2009-11-05 00:58:14 +01:00 committed by Marcos Tapajós
parent 581f3b748c
commit dad7e349a7

View file

@ -65,10 +65,10 @@ module CouchRest
content_type = args[:content_type] ? args[:content_type] : get_mime_type(args[:file]) content_type = args[:content_type] ? args[:content_type] : get_mime_type(args[:file])
self['_attachments'][args[:name]] = { self['_attachments'][args[:name]] = {
'content_type' => content_type, 'content_type' => content_type,
'data' => encode_attachment(args[:file].read) 'data' => args[:file].read
} }
end end
end # module ExtendedAttachments end # module ExtendedAttachments
end end
end end