active_archive 5.0.0 → 5.1.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
- SHA1:
3
- metadata.gz: 53a57d20b53abe71307066f628f8e5024eba8c76
4
- data.tar.gz: 05bcfc26b4081f9ad67803389fa4caeb172d6b2e
2
+ SHA256:
3
+ metadata.gz: e51700ecc706b14742671e9fd96c140946f02ef68ed2818ab5d664e007779540
4
+ data.tar.gz: 44ff7a306f97978d6f43339e77e44f081c136c2388ef7c35e7bfe5a418736869
5
5
  SHA512:
6
- metadata.gz: 4976442d877d97a811ed350592d857edcf6bfaf435e7286cbd4050c4164e40cf5223bab9f3784a329ebb8172fbac738d9a6a0ca7d1f580509169a5b84aa0e309
7
- data.tar.gz: 9696a7cb69d41e5a4b58c3f61ab7ccd88bd6e5127833c8ed126cacd21f597e976b3e228b5a17db2d28f74733b0898aa77d767e6c1735b85a2c3c787944ced307
6
+ metadata.gz: 5c34991b4945a7c4abe43784d88390c578f79a36353c2adb60017443bf21c9b8858f82fe1e55baff795d4e8f7adcb7b1f345911cf1a6c8e01e426e8b47378073
7
+ data.tar.gz: dfd43b7dae5f19f3dbef302ff5e91bd66c1502307aca1f0aee90ddae23986f99df48a6f95934f836241edd738b9b77bbaa449cac92acb4d7c4994e71620be50e
@@ -179,10 +179,7 @@ module ActiveArchive
179
179
  begin
180
180
  should_ignore_validations?(force) ? record.save(validate: false) : record.save!
181
181
 
182
- @previous_mutation_tracker = record.send(:previous_mutation_tracker)
183
- @changed_attributes = HashWithIndifferentAccess.new
184
182
  @attributes = record.instance_variable_get('@attributes')
185
- @mutation_tracker = nil
186
183
  rescue => error
187
184
  record.destroy
188
185
  raise(error)
@@ -190,10 +187,10 @@ module ActiveArchive
190
187
  end
191
188
 
192
189
  def set_record_window(_, name, reflection)
193
- quoted_table_name = reflection.quoted_table_name
190
+ qtn = reflection.table_name
194
191
  window = ActiveArchive.configuration.dependent_record_window
195
192
 
196
- query = "#{quoted_table_name}.archived_at > ? AND #{quoted_table_name}.archived_at < ?"
193
+ query = "#{qtn}.archived_at > ? AND #{qtn}.archived_at < ?"
197
194
 
198
195
  send(name).unscope(where: :archived_at)
199
196
  .where([query, archived_at - window, archived_at + window])
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActiveArchive
4
- VERSION ||= '5.0.0'
4
+ VERSION ||= '5.1.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_archive
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.0
4
+ version: 5.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Gomez
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-10-06 00:00:00.000000000 Z
11
+ date: 2018-05-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -203,7 +203,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
203
203
  version: '0'
204
204
  requirements: []
205
205
  rubyforge_project:
206
- rubygems_version: 2.6.13
206
+ rubygems_version: 2.7.7
207
207
  signing_key:
208
208
  specification_version: 4
209
209
  summary: Gem for soft-deleting ActiveRecord objects.