active_archive 5.1.6 → 5.1.7
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 +4 -4
- data/lib/active_archive/base.rb +6 -8
- data/lib/active_archive/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 02ef56cf163f46d646a5c33c14aaad6597e413faf018434af73e70293ea7bb9a
|
|
4
|
+
data.tar.gz: 46d27202b989f81bb8a9bf587d0bd4f6ef701daf18787f2521e6aa0647bfb4e6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a9e6151c972359cca2d7e98ae5e994804905cf0c591554bfae87053cd614e24dfaa75c0081280b62c57d861053cd320126e7b68eb1c7eec6a282412cf1fc86a6
|
|
7
|
+
data.tar.gz: d40636590b9f9df38dadc4ce971c15d29c5d7b1bf4a7a5817012b2dd757b4153cff8750238a68a2ab2dea92774e44c2d47a2e5cf35f8ec0803dcaf8837e30d66
|
data/lib/active_archive/base.rb
CHANGED
|
@@ -182,18 +182,16 @@ module ActiveArchive
|
|
|
182
182
|
if ::ActiveRecord::VERSION::MAJOR >= 5 && ::ActiveRecord::VERSION::MINOR >= 2
|
|
183
183
|
@mutations_before_last_save = record.send(:mutations_from_database)
|
|
184
184
|
@attributes_changed_by_setter = HashWithIndifferentAccess.new
|
|
185
|
-
@attributes = record.instance_variable_get('@attributes') || record.changes
|
|
186
|
-
@mutations_from_database = nil
|
|
187
185
|
elsif ::ActiveRecord::VERSION::MAJOR >= 5
|
|
188
186
|
@previous_mutation_tracker = record.send(:previous_mutation_tracker)
|
|
189
|
-
@changed_attributes = HashWithIndifferentAccess.new
|
|
190
|
-
@attributes = record.instance_variable_get('@attributes') || record.changes
|
|
191
|
-
@mutation_tracker = nil
|
|
192
187
|
elsif ::ActiveRecord::VERSION::MAJOR >= 4
|
|
193
|
-
@previously_changed = record.instance_variable_get('@previously_changed')
|
|
194
|
-
@attributes = record.instance_variable_get('@attributes')
|
|
195
|
-
@mutation_tracker = nil
|
|
188
|
+
@previously_changed = record.instance_variable_get('@previously_changed')
|
|
196
189
|
end
|
|
190
|
+
|
|
191
|
+
@changed_attributes = HashWithIndifferentAccess.new
|
|
192
|
+
@attributes = record.instance_variable_get('@attributes')
|
|
193
|
+
@mutation_tracker = nil
|
|
194
|
+
@mutations_from_database = nil
|
|
197
195
|
rescue => error
|
|
198
196
|
record.destroy
|
|
199
197
|
raise(error)
|