Merge branch 'master' of git://github.com/jchris/couchrest

* 'master' of git://github.com/jchris/couchrest:
  Fix up set_default to not munge existing values.
  commented out spec for fm:generate app
This commit is contained in:
Matt Lyon 2009-01-04 23:01:17 -08:00
commit a2aa4a9a3c
3 changed files with 55 additions and 32 deletions

View file

@ -506,9 +506,10 @@ module CouchRest
private
def apply_defaults
return unless new_document?
if self.class.default
self.class.default.each do |k,v|
self[k] = v
self[k] = v unless self.key?(k.to_s)
end
end
end