Initialization of ExtendentDocument model shouldn't failed on a nil value in argument
Signed-off-by: Tapajós <tapajos@gmail.com>
This commit is contained in:
parent
40bef6cafb
commit
b8bda3bb02
2 changed files with 6 additions and 1 deletions
|
@ -41,7 +41,7 @@ module CouchRest
|
|||
|
||||
def initialize(passed_keys={})
|
||||
apply_defaults # defined in CouchRest::Mixins::Properties
|
||||
set_attributes(passed_keys)
|
||||
set_attributes(passed_keys) unless passed_keys.nil?
|
||||
super
|
||||
cast_keys # defined in CouchRest::Mixins::Properties
|
||||
unless self['_id'] && self['_rev']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue