Added basic specs for attachment CRUD

This commit is contained in:
Jonathan S. Katz 2008-10-22 01:41:21 -04:00 committed by Chris Anderson
parent 8d25cbc8b0
commit e497fbbab4
3 changed files with 61 additions and 2 deletions

View file

@ -588,7 +588,7 @@ module CouchRest
def get_mime_type(file)
MIME::Types.type_for(file.path).empty? ?
'text\/plain' : MIME::Types.type_for(file.path).content_type.gsub(/\//,'\/')
'text\/plain' : MIME::Types.type_for(file.path).first.content_type.gsub(/\//,'\/')
end
def set_attachment_attr(file, attachment_name)