active_archive 5.1.6 → 5.1.7

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: 555d9d57a382834f8bc0239cf34646854b79f8db49a6db615542107342d87507
4
- data.tar.gz: 9c36c1db3a8b015787649f77d221437560216ac2667a3c21d0ba98241fe70e90
3
+ metadata.gz: 02ef56cf163f46d646a5c33c14aaad6597e413faf018434af73e70293ea7bb9a
4
+ data.tar.gz: 46d27202b989f81bb8a9bf587d0bd4f6ef701daf18787f2521e6aa0647bfb4e6
5
5
  SHA512:
6
- metadata.gz: 99c176eebbe41ad48670a6966c9fcb56d8e40cfa231fa2bd3385bdcbfd7f9a12b90fac41e70b9a43c02c2581090fb18cb37b6c87df09a693d57a9f523c3ecb2f
7
- data.tar.gz: 50ecdadab9a70583618bf09bd6d5eb486f08ac215916e5deac94bbe0842a5787bcf019a0607653837179f79eab02c79190a326996dd09a033a1174be69d013e2
6
+ metadata.gz: a9e6151c972359cca2d7e98ae5e994804905cf0c591554bfae87053cd614e24dfaa75c0081280b62c57d861053cd320126e7b68eb1c7eec6a282412cf1fc86a6
7
+ data.tar.gz: d40636590b9f9df38dadc4ce971c15d29c5d7b1bf4a7a5817012b2dd757b4153cff8750238a68a2ab2dea92774e44c2d47a2e5cf35f8ec0803dcaf8837e30d66
@@ -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') || record.changes
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)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActiveArchive
4
- VERSION ||= '5.1.6'
4
+ VERSION ||= '5.1.7'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_archive
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.6
4
+ version: 5.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Gomez