active_type 1.7.0 → 1.8.0

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: fc1d824f4bc8d16a858ad4264432940368081f7ff9dac1e6ab522e7a8e244385
4
- data.tar.gz: 62a451171a9caab0a89901856746262cb0529b7b94df191baa7ee9d01a13a6e9
3
+ metadata.gz: d14a09e976ff66dc4b1ead8c7f30cd4e81b226b005a296d65ee81770b140899a
4
+ data.tar.gz: 391c56642e084ef358af0bcb68909f512823db84e640d3b97e61efe0bce71c21
5
5
  SHA512:
6
- metadata.gz: 8e9899a9e91e7150fb56a9a3e745c86966122f596b9ebe72ee23136c232fd8e77db9f9b670a13980021e57fd46dc8f8f46d899bf9fb7faa20ef261558eb44929
7
- data.tar.gz: 66c4878918cb20e924f0c044e1ae6d862611622067eaca2608ce25caa1a67d081416a69e5e10a83dd4ce256c306cbea624860d3f699d53be5da8d0ecf21b3c15
6
+ metadata.gz: a924ce52a863ab2dbf8f1e0e40da9e8c4083f5a4f1bf3215ed44740471dc2ba8498066b9ace3a93c201cc8a2a078f5abf2ccb2816a7486f57e2cffa1b128703e
7
+ data.tar.gz: 3a3937c2815c14a432645559d87588a0ae3a6d07ee8f451ed6882e825978a391d96f109ff5f8fe1d20aebf3c87c5d952fd7aa999fe22cfd88f56a4d9d198ae37
data/CHANGELOG.md CHANGED
@@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  ## Unreleased changes
6
6
 
7
+ ## 1.8.0 (2021-04-27)
8
+
9
+ * Fixed: When casting an unsaved record, the new record will have the same associations as the base record.
10
+
11
+ ## 1.7.0 (2021-04-27)
12
+
13
+ * Added: Support for Ruby 3.0.
14
+
7
15
  ## 1.6.0 (2021-03-04)
8
16
 
9
17
  * Fixed: Numerous issues with Rails 6.1. Thanks to @vr4b4c for some of the changes.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- active_type (1.7.0)
4
+ active_type (1.8.0)
5
5
  activerecord (>= 3.2)
6
6
 
7
7
  GEM
data/Gemfile.5.2.pg.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- active_type (1.7.0)
4
+ active_type (1.8.0)
5
5
  activerecord (>= 3.2)
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- active_type (1.7.0)
4
+ active_type (1.8.0)
5
5
  activerecord (>= 3.2)
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- active_type (1.7.0)
4
+ active_type (1.8.0)
5
5
  activerecord (>= 3.2)
6
6
 
7
7
  GEM
data/Gemfile.6.1.pg.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- active_type (1.7.0)
4
+ active_type (1.8.0)
5
5
  activerecord (>= 3.2)
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- active_type (1.7.0)
4
+ active_type (1.8.0)
5
5
  activerecord (>= 3.2)
6
6
 
7
7
  GEM
@@ -34,6 +34,9 @@ module ActiveType
34
34
  casted.instance_variable_set(:@new_record, record.new_record?)
35
35
  # Rails 3.2, 4.2
36
36
  casted.instance_variable_set(:@destroyed, record.destroyed?)
37
+
38
+ casted.instance_variable_set(:@association_cache, record.instance_variable_get(:@association_cache))
39
+
37
40
  # Rails 3.2, 4.2
38
41
  errors = record.errors
39
42
  if errors.kind_of? ActiveModel::Errors
@@ -1,3 +1,3 @@
1
1
  module ActiveType
2
- VERSION = '1.7.0'
2
+ VERSION = '1.8.0'
3
3
  end
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: 1.7.0
4
+ version: 1.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias Kraze