Merge remote branch 'remotes/old/master'
Conflicts: README.md couchrest.gemspec lib/couchrest.rb lib/couchrest/mixins/properties.rb
This commit is contained in:
commit
3c2ebb022d
9 changed files with 51 additions and 7 deletions
|
@ -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)
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue