store_attribute 1.0.1 → 1.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: 1886b0beecc6ce2b4195fce3e848a5257852e00121cd17de98b296578ae28d4e
4
- data.tar.gz: e3dc1d9d70138c0f0462048616c945dea13bd85abcfd80be00262312c00faef8
3
+ metadata.gz: 076f7b987e61b6d32a5ee894f42d9ac85cf226df332400ff133bc492e4a4c184
4
+ data.tar.gz: 94fcf6d42c30e98888b8a9a7f7af880c1c2e3d0cabf25fc0e63b84e41d6e0f28
5
5
  SHA512:
6
- metadata.gz: '081a50a78e7d8b769cae2a3067ec074ac3cf18b2b915af5e84b874e94799d5a9b6f7de96d4f59cfb3b6a2f7e7f164cc57e7866bde1d4c59941b1b8174355cc16'
7
- data.tar.gz: 743f05f7d8893ff9feb40238c3f7299b15d89042cc2cc77a89f4ec51bbb92face0bbd213375a85fc2862362845e854099fb72f091ba628bc96dd029c845fafd6
6
+ metadata.gz: 6ddff720796fe0c048712b846cdf1bebe54dfdaea59d93d1fbe59557fc263156e53955fb2ee8aef0cea840b7e50f629f193ae2da8a7580108c7c466781341b1f
7
+ data.tar.gz: 0e6d69b002d492fd4619b4fd4f24eddabbc5e06332c6a597d6b292f7c0cdcb565b4189f63f5bef9e342e40cf20d585d7508b2fc54cc9c0b4dc1f2763ca3bdf7d
data/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## master
4
4
 
5
+ ## 1.0.2 (2022-07-29)
6
+
7
+ - Fix possible conflicts with Active Model objects. ([@palkan][])
8
+
9
+ - Fix passing suffix/prefix to `store_accessor` without types. ([@palkan][])
10
+
5
11
  ## 1.0.1 (2022-05-05)
6
12
 
7
13
  - Fixed suffix/prefix for predicates. ([@Alan-Marx](https://github.com/Alan-Marx))
@@ -4,6 +4,7 @@ module StoreAttribute
4
4
  # Upgrade mutation tracker to return partial changes for typed stores
5
5
  module MutationTracker
6
6
  def change_to_attribute(attr_name)
7
+ return super unless attributes.is_a?(ActiveModel::AttributeSet)
7
8
  return super unless attributes[attr_name].type.is_a?(ActiveRecord::Type::TypedStore)
8
9
 
9
10
  orig_changes = super
@@ -60,7 +60,7 @@ module ActiveRecord
60
60
  keys = keys.flatten
61
61
  typed_keys = typed_keys.except(keys)
62
62
 
63
- _orig_store_accessor_without_types(store_name, *(keys - typed_keys.keys), prefix: nil, suffix: nil)
63
+ _orig_store_accessor_without_types(store_name, *(keys - typed_keys.keys), prefix: prefix, suffix: suffix)
64
64
 
65
65
  typed_keys.each do |key, type|
66
66
  store_attribute(store_name, key, type, prefix: prefix, suffix: suffix)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module StoreAttribute # :nodoc:
4
- VERSION = "1.0.1"
4
+ VERSION = "1.0.2"
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: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - palkan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-05-06 00:00:00.000000000 Z
11
+ date: 2022-07-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord