Added basic specs for attachment CRUD
This commit is contained in:
parent
8d25cbc8b0
commit
e497fbbab4
3 changed files with 61 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue