Casting array type properties now possible

This commit is contained in:
Sam Lown 2011-07-19 18:03:31 +02:00
parent 9d724aee47
commit 3f1b2ea0c6
3 changed files with 15 additions and 8 deletions

View file

@ -43,9 +43,8 @@ module CouchRest::Model
end
end
# Cast an individual value, not an array
# Cast an individual value
def cast_value(parent, value)
raise "An array inside an array cannot be casted, use Embeddable module" if value.is_a?(Array)
value = typecast_value(value, self)
associate_casted_value_to_parent(parent, value)
end