Enabled casting of CastedModel attributes
This commit is contained in:
parent
dff005f082
commit
a1087b48fe
|
@ -10,11 +10,11 @@ module CouchRest
|
||||||
|
|
||||||
def initialize(keys={})
|
def initialize(keys={})
|
||||||
raise StandardError unless self.is_a? Hash
|
raise StandardError unless self.is_a? Hash
|
||||||
apply_defaults # defined in CouchRest::Mixins::Properties
|
|
||||||
super()
|
super()
|
||||||
keys.each do |k,v|
|
keys.each do |k,v|
|
||||||
self[k.to_s] = v
|
self[k.to_s] = v
|
||||||
end if keys
|
end if keys
|
||||||
|
apply_defaults # defined in CouchRest::Mixins::Properties
|
||||||
cast_keys # defined in CouchRest::Mixins::Properties
|
cast_keys # defined in CouchRest::Mixins::Properties
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue