Adding property build support to enable CastedArray#build

This commit is contained in:
Sam Lown 2011-05-21 14:16:39 +02:00
parent d56179aa6b
commit fcd9e2ba8e
5 changed files with 57 additions and 3 deletions

View file

@ -50,6 +50,12 @@ module CouchRest::Model
super
end
def build(*args)
obj = casted_by_property.build(*args)
self.push(obj)
obj
end
protected
def instantiate_and_cast(obj, change = true)