activerecord-cached_at 2.0.3 → 2.0.4
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf203856f29f1e18a87be4892db7fd3396208cbb
|
4
|
+
data.tar.gz: 960fc526cd4f5ed35aa6ba3028c8ca367d850ac1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8fe18f63b67fd3b7a3e0159f1a1985670c141511e60dcc5b1ee1d05e9fa8ef81a8d8e4d7f0fda6c16bee4a5fef8e84f22d0f1908a1f22c821d65be29da1aa3fe
|
7
|
+
data.tar.gz: f6b97535599ac6c02afe3fe63713590065bea24c56e5d6ec7b385e4ad968025c63b75dab3e8ae046a933f972d013ef7dd43911fe9c1868e7b585cbf452e28c11
|
@@ -86,16 +86,10 @@ module CachedAt
|
|
86
86
|
else
|
87
87
|
using_reflection.inverse_of.klass._reflections[using_reflection.inverse_of.options[:through].to_s].klass.arel_table
|
88
88
|
end
|
89
|
-
|
90
|
-
|
91
|
-
query = using_reflection.inverse_of.klass.joins(inverse_reflection.inverse_of.options[:through])
|
92
|
-
query = query.where(arel_table[inverse_reflection.foreign_key].in(ids))
|
93
|
-
else
|
94
|
-
query = using_reflection.inverse_of.klass.joins(using_reflection.inverse_of.options[:through])
|
95
|
-
query = query.where(arel_table[using_reflection.foreign_key].in(ids))
|
96
|
-
end
|
97
|
-
|
89
|
+
|
90
|
+
query = using_reflection.inverse_of.klass.where(using_reflection.inverse_of.klass.primary_key => owner.id)
|
98
91
|
query.update_all({ cache_column => timestamp })
|
92
|
+
puts "#{owner.class.name}.#{cache_column} = #{timestamp}"
|
99
93
|
owner.raw_write_attribute(cache_column, timestamp)
|
100
94
|
traverse_relationships(klass, reflection.options[:cached_at], query, cache_column, timestamp)
|
101
95
|
end
|
data/lib/cached_at/version.rb
CHANGED
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.
|
4
|
+
version: 2.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jon Bracy
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 5.0.0
|
19
|
+
version: 5.0.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 5.0.0
|
26
|
+
version: 5.0.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|