Renaming Attribute Protection and solving problem modifying the provided hash to the #attributes= method
This commit is contained in:
parent
1d1d815435
commit
d0ed97ed8b
12 changed files with 65 additions and 112 deletions
|
@ -13,7 +13,7 @@ module CouchRest
|
|||
include CouchRest::Model::ExtendedAttachments
|
||||
include CouchRest::Model::ClassProxy
|
||||
include CouchRest::Model::Collection
|
||||
include CouchRest::Model::AttributeProtection
|
||||
include CouchRest::Model::PropertyProtection
|
||||
include CouchRest::Model::Associations
|
||||
include CouchRest::Model::Validations
|
||||
|
||||
|
@ -47,7 +47,7 @@ module CouchRest
|
|||
# * :directly_set_attributes: true when data comes directly from database
|
||||
#
|
||||
def initialize(doc = {}, options = {})
|
||||
prepare_all_attributes(doc, options)
|
||||
doc = prepare_all_attributes(doc, options)
|
||||
super(doc)
|
||||
unless self['_id'] && self['_rev']
|
||||
self[self.model_type_key] = self.class.to_s
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue