protobuf-mongoid 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1dc8ea63ac8607eb6435e75b8638ff4cf5735c8a0f4d2fdd6df9d72cf2c78c4b
4
- data.tar.gz: d6769b7aeaf095e6aa1b68444feea2c073e528b588f64dfc42a7cd2b57c14db2
3
+ metadata.gz: 6ec9452b3c9d590a82861232b5ccf8e0b4762c2ca4edf998b2247dc4bf148888
4
+ data.tar.gz: '08938711aeada38d67736f9d648ad37184e00cd4327a191cd73dd13c32072bc6'
5
5
  SHA512:
6
- metadata.gz: b2edf7540ddebb909650e1741fd09b85d5fe517f1768364ffebd04f58929dcbcc2ceef2888f0ae4306a7ef892df87cbf9159ae98e44a1f6f66f0f0808ac9e3bb
7
- data.tar.gz: af66b0131bb5e401620b5526ee21831f21c854a33c964c7bcfa64dc9875409a490fe9e22cf7cee0247ee5f0b3affbadec9e8e54f68b797bf3a573baeebe9a15a
6
+ metadata.gz: a1d20daf952783c4e5562ebd7b1d25d5159480ac71d391bbba32469141599a868a6117e7722eab61db017981e395bfab21d927112211fdeec1857b686b4986b3
7
+ data.tar.gz: d928ca6a6821f8ef76cf41277abe83e962d4ffb0cbaea230ca26686af85e5c6a84980497e965d8604411880928a1f1d9126f45c3f26ca02e42d36a89a0f33c0d
@@ -158,10 +158,11 @@ module Protobuf
158
158
  hash
159
159
  end
160
160
 
161
- return attributes unless proto.field?(:nullify) && proto.nullify.is_a?(Array)
162
-
163
- proto.nullify.each do |attribute_name|
164
- attributes[attribute_name.to_sym] = nil if attribute_names.include?(attribute_name.to_s)
161
+ # Ensure attributes specified in the `nullify` field are set to nil
162
+ if proto.field?(:nullify) && proto.nullify.is_a?(Array)
163
+ proto.nullify.each do |attribute_name|
164
+ attributes[attribute_name.to_sym] = nil if attribute_fields.key?(attribute_name.to_sym)
165
+ end
165
166
  end
166
167
 
167
168
  attributes
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Protobuf
4
4
  module Mongoid
5
- VERSION = '0.0.1'
5
+ VERSION = '0.0.2'
6
6
  end
7
- end
7
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: protobuf-mongoid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luilver Garces
@@ -145,7 +145,7 @@ files:
145
145
  - lib/protobuf/mongoid/transformer.rb
146
146
  - lib/protobuf/mongoid/validations.rb
147
147
  - lib/protobuf/mongoid/version.rb
148
- homepage: https://github.com/yourusername/protobuf-mongoid
148
+ homepage: https://github.com/luilver/protobuf-mongoid
149
149
  licenses:
150
150
  - MIT
151
151
  metadata: {}