activerecord-precounter 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/active_record/precounter.rb +1 -1
- data/lib/active_record/precounter/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: c3c08d0e856aad769711131f6e7276b777e2f6cd
|
4
|
+
data.tar.gz: 6648ad8319c9bd466b0693b2d3386c19f74e2d37
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 966efeff214aa006d5d272afd5197d80a64f93df982ddd8e0302b0326c182024961d50cc9f519f79821f5da651a5d2a23f8ae7e9a11efee663cf0a5bd5199891
|
7
|
+
data.tar.gz: 9df24ac11ae3cfdd91037422b94e4fd3e9b40da5e21fee2a1cb6c42f3651891f389816537e81154ab56d74f5d9b1016f4ec87a7ece58a8901bad60e60955b139
|
@@ -27,7 +27,7 @@ module ActiveRecord
|
|
27
27
|
end
|
28
28
|
|
29
29
|
count_by_id = if reflection.has_scope?
|
30
|
-
reflection.scope_for(reflection.klass.where(reflection.inverse_of.name => records.map(&:id))
|
30
|
+
reflection.scope_for(reflection.klass).where(reflection.inverse_of.name => records.map(&:id)).group(
|
31
31
|
reflection.inverse_of.foreign_key
|
32
32
|
).count
|
33
33
|
else
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-precounter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takashi Kokubun
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-06
|
11
|
+
date: 2018-11-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -152,7 +152,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
152
152
|
version: '0'
|
153
153
|
requirements: []
|
154
154
|
rubyforge_project:
|
155
|
-
rubygems_version: 2.
|
155
|
+
rubygems_version: 2.6.13
|
156
156
|
signing_key:
|
157
157
|
specification_version: 4
|
158
158
|
summary: Yet Another N+1 COUNT Query Killer for ActiveRecord
|