Adding support for defining cast_as on properties as a Class

This commit is contained in:
Sam Lown 2010-03-30 20:50:47 +00:00
parent 64d68ecc1a
commit dd3df8fb69
8 changed files with 34 additions and 25 deletions

View file

@ -101,7 +101,7 @@ module CouchRest
end
# length
if property.type == "String"
if property.type == String
# XXX: maybe length should always return a Range, with the min defaulting to 1
# 52 being the max set
len = property.options.fetch(:length, property.options.fetch(:size, 52))