Enabled casting of CastedModel attributes
This commit is contained in:
parent
dff005f082
commit
a1087b48fe
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue