From dad7e349a706a3ac413aad322bb8b149fcc8fdc2 Mon Sep 17 00:00:00 2001 From: "Johannes J. Schmidt" Date: Thu, 5 Nov 2009 00:58:14 +0100 Subject: [PATCH] fixed set_attachment_attr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit works with CouchDB 0.10.0 * use "content_type" instead of "content-type" * do not encode attachment Signed-off-by: Marcos Tapajós --- lib/couchrest/mixins/extended_attachments.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/couchrest/mixins/extended_attachments.rb b/lib/couchrest/mixins/extended_attachments.rb index 8dbac45..e81670b 100644 --- a/lib/couchrest/mixins/extended_attachments.rb +++ b/lib/couchrest/mixins/extended_attachments.rb @@ -65,10 +65,10 @@ module CouchRest content_type = args[:content_type] ? args[:content_type] : get_mime_type(args[:file]) self['_attachments'][args[:name]] = { 'content_type' => content_type, - 'data' => encode_attachment(args[:file].read) + 'data' => args[:file].read } end end # module ExtendedAttachments end -end \ No newline at end of file +end