activerecord-cached_at 2.0.10 → 2.0.11

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: 8b2ffc9cf442af988e5a637100e8e7cef7380511
4
- data.tar.gz: 8372a8d499f379fb2534884e0c47535df8f21cd2
3
+ metadata.gz: 5860c53030bc1c81930921e85181a18d967350a3
4
+ data.tar.gz: c4e1b6c432bd192b59f5dbe305f372e9c5f3f112
5
5
  SHA512:
6
- metadata.gz: 1a3baf4dd23c1bb39d567e6507e302f087fe37e2041d27636c0c8b466b29143d9b96fa7ac95bf625f3d7e9ad4e86952b508c3405413db2f5f2e86fb88d6b4d38
7
- data.tar.gz: 2e75b8567f7ee8a5b4287b3f3dd6de0cba9c5660a1c844a576ab4fdbd2552150690dc1d2811d43356345bb6f24fb1ae79079fe528ee2ca4f4358f3cbe4ef778c
6
+ metadata.gz: 19894074ae6826f70a9498ea336427f6f9473225a6be2e9980f259d1674e50e2cb8521ec978a5686f0959c235ce9fcfef0375ea1fc99dfe66cb409ef989f0461
7
+ data.tar.gz: 74dcc58f9a1181981e44a3bb75f4ed269bd9027ef08292d5614184c5155dea9a7139d173018d979f44e9e66b503acf94ba71b398d93ae7c91d1532b4205ce507
@@ -32,11 +32,11 @@ module CachedAt
32
32
  traverse_relationships(klass, options[:cached_at], query, cache_column, timestamp)
33
33
  end
34
34
 
35
- if using_reflection.inverse_of && using_reflection.inverse_of.options[:cached_at]
35
+ #TODO: test with new record (fails in mls)
36
+ if !owner.new_record? && using_reflection.inverse_of && using_reflection.inverse_of.options[:cached_at]
36
37
  cache_column = "#{using_reflection.name}_cached_at"
37
- owner.raw_write_attribute(cache_column, timestamp) unless timestamp.nil?
38
- #TODO: test with new record (fails in mls)
39
- owner.update_columns(cache_column => timestamp) unless owner.new_record?
38
+ owner.raw_write_attribute(cache_column, timestamp)
39
+ owner.update_columns(cache_column => timestamp)
40
40
  end
41
41
  end
42
42
 
@@ -1,3 +1,3 @@
1
1
  module CachedAt
2
- VERSION = '2.0.10'
2
+ VERSION = '2.0.11'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-cached_at
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.10
4
+ version: 2.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Bracy