store_attribute 0.9.2 → 0.9.3

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: adaa8107d5917cf34ec29623a75a16fd14b7c5231ee57c7b6c0d3fdac1632b42
4
- data.tar.gz: 8b7a96bc6da2779a1c7812d453374b312a52c77068511796c0199617f875d2e7
3
+ metadata.gz: 30037caf4b9958aaeb466c389e8e59221c1f165758b98ea8935aeee305772351
4
+ data.tar.gz: 85326e5621d54adc901f281c9762a313b21053e4e3189fc49bb1fac025d76451
5
5
  SHA512:
6
- metadata.gz: 9fb0f5ae8ac985d43c909df92930e8a60dcf8910d967a563b23524021ab8acc014fa6e83cbcca6687855c2372c48450a65b5ebb801475f1dd0a7100a9a7a8a6c
7
- data.tar.gz: 54703853d6172fd22bd54bec3460045dd298aeb12984bd6763b45a8a48943f6ff20329cef4b744bfd36732bb5e1a3ff0bac97f82fb15cf06b170b1592025d577
6
+ metadata.gz: 2c638242092c8e601e17d9d45c603ca2135fa74cc44fa5b57466d37a1f83c43f870570abd27c44e3d7f6d8f2f335c67c16af5c61b1e89bacc4140e4c3a441749
7
+ data.tar.gz: 668a9a68039681b1e5e1812d762e95b08129b969d1b740e3bb80b1ad5aec1ac3bb8acd69ccff611da65b9718320f85f0ade4d2e89c2242ed87cb23e8deabb197
data/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## master
4
4
 
5
+ ## 0.9.3 (2021-11-17)
6
+
7
+ - Fix keeping empty store hashes in the changes. ([@markedmondson][])
8
+
9
+ See [PR#22](https://github.com/palkan/store_attribute/pull/22).
10
+
5
11
  ## 0.9.2 (2021-10-13)
6
12
 
7
13
  - Fix bug with store mutation during changes calculation. ([@palkan][])
@@ -199,7 +199,11 @@ module ActiveRecord
199
199
  end
200
200
  end
201
201
 
202
- changes[accessor] = prev_store, new_store
202
+ if prev_store.present? || new_store.present?
203
+ changes[accessor] = prev_store, new_store
204
+ else
205
+ changes.delete(accessor)
206
+ end
203
207
  end
204
208
  changes
205
209
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module StoreAttribute # :nodoc:
4
- VERSION = "0.9.2"
4
+ VERSION = "0.9.3"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: store_attribute
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - palkan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-13 00:00:00.000000000 Z
11
+ date: 2021-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord