vorpal 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cf920ae279d48b7b9db84a79c77eeb521602a885c8fe88e8f2121e47a5a46e41
4
- data.tar.gz: 9e97596434cf65e598279005a0bb325cadde5d7a6d3f2180ea5a828432f89760
3
+ metadata.gz: 83737ac0a684cae35b5e849cba0c7851234dd83644ec04458e2c3c49ae0213f1
4
+ data.tar.gz: 8ac93c1267e080bc874dc2526d7b9f2c5abc1635c579d0f4be7cbd9af4fd7fc9
5
5
  SHA512:
6
- metadata.gz: d7c07c613b24c7d342be0361e33bda6db6cff0270222db1b7ca8018cf141fb623b2583e49a0d39db51d53389225e527d6a5fd74f133edc6f7653309e86644be4
7
- data.tar.gz: 492d62d23506de0e26ffdc8e525169dcb78d6c1060dc9309c9828e9865f2341e8f01cc84fe95a059d01d89462c62292a67ebcfc4148ce4ace770884a56e5e04c
6
+ metadata.gz: 959ef178a6479c47053c2d100c323a48134fdcf7c63479c21afff0cc7cb91f2a198962013e5b324c7a8a4b1946e19332b15198c957c3e1b097e7734036b2ab09
7
+ data.tar.gz: 2783c22ba9362a9285e4e80369565a8be0695feb910325f77233b43060826dfffafd03e74c2c4cdcb554e6246eba1e42441b7b2f94d7ba0748cda140effee044
data/README.md CHANGED
@@ -180,8 +180,6 @@ Vorpal.define do
180
180
  end
181
181
  ```
182
182
 
183
- CAVEAT: Vorpal currently does NOT SUPPORT anyone but Vorpal setting the id of an entity!
184
-
185
183
  ## API Documentation
186
184
 
187
185
  http://rubydoc.info/github/nulogy/vorpal/main/frames
@@ -159,10 +159,10 @@ module Vorpal
159
159
  def serialize_object(object, config, loaded_db_objects)
160
160
  if config.serialization_required?
161
161
  attributes = config.serialize(object)
162
- if object.id.nil?
162
+ db_object = loaded_db_objects.find_by_id(config, object.id)
163
+ if object.id.nil? || db_object.nil? # object doesn't exist in the DB
163
164
  config.build_db_object(attributes)
164
165
  else
165
- db_object = loaded_db_objects.find_by_id(config, object.id)
166
166
  config.set_db_object_attributes(db_object, attributes)
167
167
  db_object
168
168
  end
@@ -1,3 +1,3 @@
1
1
  module Vorpal
2
- VERSION = "1.2.0"
2
+ VERSION = "1.2.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vorpal
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Kirby
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-11-25 00:00:00.000000000 Z
11
+ date: 2020-11-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: simple_serializer