active_type 2.6.1 → 2.6.2

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: 4ea818b092133716848f5afefa6adbd282f6377a4ce2f02687b0e1fa25a2e9c6
4
- data.tar.gz: 234893cb582d30e6fa5f048dac118c5298ccc7f6ab96b5c45f7a9ef2defd0cc9
3
+ metadata.gz: 8e6ed5e81a70acff0be214e9a3a653f4142fac9bd1a4a5840810d440da0c53c0
4
+ data.tar.gz: f1634c346152775f229004f5a77b2c98c107f1a530219060fb7e1ca6d38f5b6c
5
5
  SHA512:
6
- metadata.gz: 28e54d2161217778d9cbd9876fe2689a56c46443070f1dbdeff33c1271bfcd19d63e38469b650aa95e466a86b5ceb2d19a75c1f1270a3d32512dd809d89a4840
7
- data.tar.gz: 6f14bd7f4ffface250b451eeec8d865b0f36271ae168a89755f7fd090be017bd4c6297f63401acfe844aaea6dda924358683e9512fc536770fdeb9b4dc121099
6
+ metadata.gz: 71a7ba9a1d620cdd2ee58bfbcb1c3b087ebcaec36d4f4d984f434d959420df9da30eeb5b1eef035aebb9c76986a2578e4c9a6fba0fda3258bcce063faf2f5329
7
+ data.tar.gz: 382be4ad591537dda5e19e58256c5479a1a12bd488d9939e697f3c68292746c2d8c23e518a0d7e3f9db48db4246007a7adaf1b778cdc29e92c58890715143cca
data/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## 2.6.2 (2025-02-12)
6
+
7
+ * Fixed: Issue with `ActiveType::Object` when using an optional `belongs_to` on a virtual attribute.
8
+ Thanks to @kyanagi.
9
+
5
10
  ## 2.6.1 (2025-01-17)
6
11
 
7
12
  * Fixed: Issue with `ActiveType::Object` when using has_many on Rails 7.2.
data/Gemfile.6.1.pg.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- active_type (2.6.1)
4
+ active_type (2.6.2)
5
5
  activerecord (>= 6.1)
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- active_type (2.6.1)
4
+ active_type (2.6.2)
5
5
  activerecord (>= 6.1)
6
6
 
7
7
  GEM
data/Gemfile.7.1.pg.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- active_type (2.6.1)
4
+ active_type (2.6.2)
5
5
  activerecord (>= 6.1)
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- active_type (2.6.1)
4
+ active_type (2.6.2)
5
5
  activerecord (>= 6.1)
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- active_type (2.6.1)
4
+ active_type (2.6.2)
5
5
  activerecord (>= 6.1)
6
6
 
7
7
  GEM
@@ -70,4 +70,4 @@ DEPENDENCIES
70
70
  rspec (~> 3.4)
71
71
 
72
72
  BUNDLED WITH
73
- 2.6.1
73
+ 2.6.2
data/Gemfile.7.2.pg.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- active_type (2.6.1)
4
+ active_type (2.6.2)
5
5
  activerecord (>= 6.1)
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- active_type (2.6.1)
4
+ active_type (2.6.2)
5
5
  activerecord (>= 6.1)
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- active_type (2.6.1)
4
+ active_type (2.6.2)
5
5
  activerecord (>= 6.1)
6
6
 
7
7
  GEM
@@ -81,4 +81,4 @@ DEPENDENCIES
81
81
  sqlite3
82
82
 
83
83
  BUNDLED WITH
84
- 2.6.1
84
+ 2.6.2
@@ -1,3 +1,3 @@
1
1
  module ActiveType
2
- VERSION = '2.6.1'
2
+ VERSION = '2.6.2'
3
3
  end
@@ -239,6 +239,15 @@ module ActiveType
239
239
  super.merge(changes)
240
240
  end
241
241
 
242
+ def attribute_changed?(attr, **)
243
+ attr = attr.to_s
244
+ if virtual_attributes.key?(attr)
245
+ virtual_attributes_were[attr] != send(attr)
246
+ else
247
+ super
248
+ end
249
+ end
250
+
242
251
  if ActiveRecord::VERSION::MAJOR >= 4
243
252
  def changes_applied
244
253
  super
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_type
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.1
4
+ version: 2.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias Kraze
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2025-01-17 00:00:00.000000000 Z
12
+ date: 2025-02-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler