Merge remote branch 'tapajos/master'

Conflicts:
	README.md
	lib/couchrest/mixins/properties.rb
	spec/couchrest/core/database_spec.rb
	spec/couchrest/more/extended_doc_spec.rb
This commit is contained in:
Tapajós 2009-09-20 22:52:39 -03:00
commit 2f2c507582
11 changed files with 47 additions and 11 deletions

View file

@ -64,7 +64,7 @@ module CouchRest
def set_attachment_attr(args)
content_type = args[:content_type] ? args[:content_type] : get_mime_type(args[:file])
self['_attachments'][args[:name]] = {
'content-type' => content_type,
'content_type' => content_type,
'data' => encode_attachment(args[:file].read)
}
end

View file

@ -245,6 +245,7 @@ module CouchRest
# if the document is not saved properly.
def save!
raise "#{self.inspect} failed to save" unless self.save
true
end
# Deletes the document from the database. Runs the :destroy callbacks.