Enabled casting of CastedModel attributes

This commit is contained in:
Eric Watson 2009-05-25 11:46:39 -05:00 committed by Matt Aimonetti
parent dff005f082
commit a1087b48fe

View file

@ -10,11 +10,11 @@ module CouchRest
def initialize(keys={})
raise StandardError unless self.is_a? Hash
apply_defaults # defined in CouchRest::Mixins::Properties
super()
keys.each do |k,v|
self[k.to_s] = v
end if keys
apply_defaults # defined in CouchRest::Mixins::Properties
cast_keys # defined in CouchRest::Mixins::Properties
end