activerecord-cached_at 5.1.0 → 5.1.0.1

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
  SHA1:
3
- metadata.gz: c9738b748326936b6c9ca40a335f3ff903ddbdb2
4
- data.tar.gz: d2a4acd817f4f27deaa58984ab285946c711dbd8
3
+ metadata.gz: a70a7d08a92ea23d008c9ab6f063e44e65244649
4
+ data.tar.gz: aa57dbad3ff6e72582f1fd65e41695bdf02cf1fa
5
5
  SHA512:
6
- metadata.gz: 0b16e4afd909f8091721348e23d54f2d71427bcb550016d77677574bb19a525c2f12cb8fbccb25b1de39d82604f954be5674ec7e99611bfb0e776c21398bdcb0
7
- data.tar.gz: 49bc4f9883cd48034e0dcad03b8525e750dd59244e143946d3c33b4f88a54d19705183b69492dba045dee6dc9e4729ca9b144817603ce718f734a11b3b671f0e
6
+ metadata.gz: 506bbf8c2591e452b3391e8c1d97a6129c6629918b0c3d24532396adc29d143d8302e6dd08d5915d587d1083b3ec43e6c1e8ee7ab0fca7194751136567a269c1
7
+ data.tar.gz: d8b452f10dc8f39886f813ce9c9546b84448d02fa2831dfcf990aa2d45b45ec9fb572f547c7eff1e6bcba80e98198ccca8fc7abdebeb904679e6298170363f65
@@ -55,9 +55,9 @@ module CachedAt
55
55
  cache_column = "#{reflection.name}_cached_at"
56
56
 
57
57
  if self.attribute_names.include?(cache_column)
58
- if self.changes.has_key?(reflection.foreign_key) && self.changes[reflection.foreign_key][1].nil?
58
+ if self.changes_to_save.has_key?(reflection.foreign_key) && self.changes_to_save[reflection.foreign_key][1].nil?
59
59
  self.assign_attributes({ cache_column => current_time_from_proper_timezone })
60
- elsif (self.changes[reflection.foreign_key] || self.new_record? || (self.association(reflection.name).loaded? && self.send(reflection.name) && self.send(reflection.name).id.nil?)) && self.send(reflection.name).try(:cached_at)
60
+ elsif (self.changes_to_save[reflection.foreign_key] || self.new_record? || (self.association(reflection.name).loaded? && self.send(reflection.name) && self.send(reflection.name).id.nil?)) && self.send(reflection.name).try(:cached_at)
61
61
  self.assign_attributes({ cache_column => self.send(reflection.name).cached_at })
62
62
  end
63
63
  end
@@ -1,3 +1,3 @@
1
1
  module CachedAt
2
- VERSION = '5.1.0'
2
+ VERSION = '5.1.0.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-cached_at
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.0
4
+ version: 5.1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Bracy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-28 00:00:00.000000000 Z
11
+ date: 2017-08-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -171,7 +171,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
171
171
  version: '0'
172
172
  requirements: []
173
173
  rubyforge_project:
174
- rubygems_version: 2.6.11
174
+ rubygems_version: 2.6.13
175
175
  signing_key:
176
176
  specification_version: 4
177
177
  summary: Allows ActiveRecord and Rails to use a `cached_at` column for the `cache_key`