Merge remote branch 'remotes/old/master'

Conflicts:
	README.md
	couchrest.gemspec
	lib/couchrest.rb
	lib/couchrest/mixins/properties.rb
This commit is contained in:
Tapajós 2009-09-03 23:10:06 -03:00
commit 3c2ebb022d
9 changed files with 51 additions and 7 deletions

View file

@ -80,6 +80,8 @@ module CouchRest
# 'boolean' type is simply used to generate a property? accessor method
elsif ((property.init_method == 'new') && target == 'boolean')
self[key]
elsif ((property.init_method == 'new') && target == 'Date')
self[key].is_a?(String) ? Date.parse(self[key].dup) : self[key]
else
# Let people use :send as a Time parse arg
klass = ::CouchRest.constantize(target)

View file

@ -224,6 +224,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.