bullet 7.1.2 → 7.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7c62bb5eb8bdfdb62ce49a79609ce7665d6af8be0f7dede7361379597415dcd4
4
- data.tar.gz: 8da00673c07b79eb6dbf7b061aaf6dd0208fd0be841a96c3169ba919259fcf82
3
+ metadata.gz: 5f9b086db84fa8fdafa36938f0b7bf8f54d7a9c2602df6eb1359fb8754c73e99
4
+ data.tar.gz: 10b7f19f4b16f083bda3fb76c79ed7f46511e9be1f64a11b80f8b3560a93ace2
5
5
  SHA512:
6
- metadata.gz: f33ad269a72ba293680c65ed460ef4e598446eebf62c82d79879de03b3cb52098f27499cab681facec3fdc3a3d6f937d064c21621aefcc69edcf499a52680838
7
- data.tar.gz: 4a386c2bda2cdea90926ce9ff8bca0932954507ac4fa1e5986a356d869c3fb410b48708a5de843fb0e1f822f744ef1cf26dcecc9036ad3036f774ffad1c6e84e
6
+ metadata.gz: 35caac02b6152db8d67dbe2ea35df8d2f60171f4855eb12143edf64b76fdb14bc52b59e4d2eb730d57ed5e84d7c7d98cda297e039a62bc857cd0a00b765b1e4c
7
+ data.tar.gz: ad948041bbf2b075de093c9e751118e0b44e1196feb43a95073f6f6b036944f144233374f0142af0add48150cb6735af458713c7c684f6fe7955a492caf67f80
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  ## Next Release
2
2
 
3
+ ## 7.1.4 (11/17/2023)
4
+
5
+ * Call association also on through reflection
6
+
7
+ ## 7.1.3 (11/05/2023)
8
+
9
+ * Call NPlusOneQuery's call_association when calling count on collection assocation
10
+
3
11
  ## 7.1.2 (10/13/2023)
4
12
 
5
13
  * Handle Rails 7.1 composite primary keys
data/README.md CHANGED
@@ -287,17 +287,17 @@ $ rails new test_bullet
287
287
  $ cd test_bullet
288
288
  $ rails g scaffold post name:string
289
289
  $ rails g scaffold comment name:string post_id:integer
290
- $ bundle exec rake db:migrate
290
+ $ bundle exec rails db:migrate
291
291
  ```
292
292
 
293
293
  2\. Change `app/models/post.rb` and `app/models/comment.rb`
294
294
 
295
295
  ```ruby
296
- class Post < ActiveRecord::Base
296
+ class Post < ApplicationRecord
297
297
  has_many :comments
298
298
  end
299
299
 
300
- class Comment < ActiveRecord::Base
300
+ class Comment < ApplicationRecord
301
301
  belongs_to :post
302
302
  end
303
303
  ```
@@ -107,12 +107,17 @@ module Bullet
107
107
  result = origin_construct_association(record, join, row)
108
108
 
109
109
  if Bullet.start?
110
- associations = join.reflection.name
111
- Bullet::Detector::Association.add_object_associations(record, associations)
112
- Bullet::Detector::NPlusOneQuery.call_association(record, associations)
113
- @bullet_eager_loadings[record.class] ||= {}
114
- @bullet_eager_loadings[record.class][record] ||= Set.new
115
- @bullet_eager_loadings[record.class][record] << associations
110
+ associations = [join.reflection.name]
111
+ if join.reflection.nested?
112
+ associations << join.reflection.through_reflection.name
113
+ end
114
+ associations.each do |association|
115
+ Bullet::Detector::Association.add_object_associations(record, association)
116
+ Bullet::Detector::NPlusOneQuery.call_association(record, association)
117
+ @bullet_eager_loadings[record.class] ||= {}
118
+ @bullet_eager_loadings[record.class][record] ||= Set.new
119
+ @bullet_eager_loadings[record.class][record] << association
120
+ end
116
121
  end
117
122
 
118
123
  result
@@ -181,6 +186,7 @@ module Bullet
181
186
  def count(column_name = nil, options = {})
182
187
  if Bullet.start?
183
188
  Bullet::Detector::CounterCache.add_counter_cache(proxy_association.owner, proxy_association.reflection.name)
189
+ Bullet::Detector::NPlusOneQuery.call_association(proxy_association.owner, proxy_association.reflection.name)
184
190
  end
185
191
  super(column_name, options)
186
192
  end
@@ -110,12 +110,17 @@ module Bullet
110
110
  result = origin_construct_model(record, node, row, model_cache, id, aliases)
111
111
 
112
112
  if Bullet.start?
113
- associations = node.reflection.name
114
- Bullet::Detector::Association.add_object_associations(record, associations)
115
- Bullet::Detector::NPlusOneQuery.call_association(record, associations)
116
- @bullet_eager_loadings[record.class] ||= {}
117
- @bullet_eager_loadings[record.class][record] ||= Set.new
118
- @bullet_eager_loadings[record.class][record] << associations
113
+ associations = [node.reflection.name]
114
+ if node.reflection.nested?
115
+ associations << node.reflection.through_reflection.name
116
+ end
117
+ associations.each do |association|
118
+ Bullet::Detector::Association.add_object_associations(record, association)
119
+ Bullet::Detector::NPlusOneQuery.call_association(record, association)
120
+ @bullet_eager_loadings[record.class] ||= {}
121
+ @bullet_eager_loadings[record.class][record] ||= Set.new
122
+ @bullet_eager_loadings[record.class][record] << association
123
+ end
119
124
  end
120
125
 
121
126
  result
@@ -173,6 +178,7 @@ module Bullet
173
178
  def count(column_name = nil, options = {})
174
179
  if Bullet.start?
175
180
  Bullet::Detector::CounterCache.add_counter_cache(proxy_association.owner, proxy_association.reflection.name)
181
+ Bullet::Detector::NPlusOneQuery.call_association(proxy_association.owner, proxy_association.reflection.name)
176
182
  end
177
183
  super(column_name, options)
178
184
  end
@@ -129,12 +129,17 @@ module Bullet
129
129
  id = row[key]
130
130
  next unless id.nil?
131
131
 
132
- associations = node.reflection.name
133
- Bullet::Detector::Association.add_object_associations(ar_parent, associations)
134
- Bullet::Detector::NPlusOneQuery.call_association(ar_parent, associations)
135
- @bullet_eager_loadings[ar_parent.class] ||= {}
136
- @bullet_eager_loadings[ar_parent.class][ar_parent] ||= Set.new
137
- @bullet_eager_loadings[ar_parent.class][ar_parent] << associations
132
+ associations = [node.reflection.name]
133
+ if node.reflection.nested?
134
+ associations << node.reflection.through_reflection.name
135
+ end
136
+ associations.each do |association|
137
+ Bullet::Detector::Association.add_object_associations(ar_parent, association)
138
+ Bullet::Detector::NPlusOneQuery.call_association(ar_parent, association)
139
+ @bullet_eager_loadings[ar_parent.class] ||= {}
140
+ @bullet_eager_loadings[ar_parent.class][ar_parent] ||= Set.new
141
+ @bullet_eager_loadings[ar_parent.class][ar_parent] << association
142
+ end
138
143
  end
139
144
  end
140
145
  end
@@ -147,12 +152,17 @@ module Bullet
147
152
  result = origin_construct_model(record, node, row, model_cache, id, aliases)
148
153
 
149
154
  if Bullet.start?
150
- associations = node.reflection.name
151
- Bullet::Detector::Association.add_object_associations(record, associations)
152
- Bullet::Detector::NPlusOneQuery.call_association(record, associations)
153
- @bullet_eager_loadings[record.class] ||= {}
154
- @bullet_eager_loadings[record.class][record] ||= Set.new
155
- @bullet_eager_loadings[record.class][record] << associations
155
+ associations = [node.reflection.name]
156
+ if node.reflection.nested?
157
+ associations << node.reflection.through_reflection.name
158
+ end
159
+ associations.each do |association|
160
+ Bullet::Detector::Association.add_object_associations(record, association)
161
+ Bullet::Detector::NPlusOneQuery.call_association(record, association)
162
+ @bullet_eager_loadings[record.class] ||= {}
163
+ @bullet_eager_loadings[record.class][record] ||= Set.new
164
+ @bullet_eager_loadings[record.class][record] << association
165
+ end
156
166
  end
157
167
 
158
168
  result
@@ -238,6 +248,7 @@ module Bullet
238
248
  def count(column_name = nil, options = {})
239
249
  if Bullet.start?
240
250
  Bullet::Detector::CounterCache.add_counter_cache(proxy_association.owner, proxy_association.reflection.name)
251
+ Bullet::Detector::NPlusOneQuery.call_association(proxy_association.owner, proxy_association.reflection.name)
241
252
  end
242
253
  super(column_name, options)
243
254
  end
@@ -138,12 +138,17 @@ module Bullet
138
138
  id = row[key]
139
139
  next unless id.nil?
140
140
 
141
- associations = node.reflection.name
142
- Bullet::Detector::Association.add_object_associations(ar_parent, associations)
143
- Bullet::Detector::NPlusOneQuery.call_association(ar_parent, associations)
144
- @bullet_eager_loadings[ar_parent.class] ||= {}
145
- @bullet_eager_loadings[ar_parent.class][ar_parent] ||= Set.new
146
- @bullet_eager_loadings[ar_parent.class][ar_parent] << associations
141
+ associations = [node.reflection.name]
142
+ if node.reflection.through_reflection?
143
+ associations << node.reflection.through_reflection.name
144
+ end
145
+ associations.each do |association|
146
+ Bullet::Detector::Association.add_object_associations(ar_parent, association)
147
+ Bullet::Detector::NPlusOneQuery.call_association(ar_parent, association)
148
+ @bullet_eager_loadings[ar_parent.class] ||= {}
149
+ @bullet_eager_loadings[ar_parent.class][ar_parent] ||= Set.new
150
+ @bullet_eager_loadings[ar_parent.class][ar_parent] << association
151
+ end
147
152
  end
148
153
  end
149
154
  end
@@ -156,12 +161,17 @@ module Bullet
156
161
  result = super
157
162
 
158
163
  if Bullet.start?
159
- associations = node.reflection.name
160
- Bullet::Detector::Association.add_object_associations(record, associations)
161
- Bullet::Detector::NPlusOneQuery.call_association(record, associations)
162
- @bullet_eager_loadings[record.class] ||= {}
163
- @bullet_eager_loadings[record.class][record] ||= Set.new
164
- @bullet_eager_loadings[record.class][record] << associations
164
+ associations = [node.reflection.name]
165
+ if node.reflection.through_reflection?
166
+ associations << node.reflection.through_reflection.name
167
+ end
168
+ associations.each do |association|
169
+ Bullet::Detector::Association.add_object_associations(record, association)
170
+ Bullet::Detector::NPlusOneQuery.call_association(record, association)
171
+ @bullet_eager_loadings[record.class] ||= {}
172
+ @bullet_eager_loadings[record.class][record] ||= Set.new
173
+ @bullet_eager_loadings[record.class][record] << association
174
+ end
165
175
  end
166
176
 
167
177
  result
@@ -269,6 +279,10 @@ module Bullet
269
279
  proxy_association.owner,
270
280
  proxy_association.reflection.name
271
281
  )
282
+ Bullet::Detector::NPlusOneQuery.call_association(
283
+ proxy_association.owner,
284
+ proxy_association.reflection.name
285
+ )
272
286
  end
273
287
  super
274
288
  end
@@ -101,12 +101,17 @@ module Bullet
101
101
  id = row[key]
102
102
  next unless id.nil?
103
103
 
104
- associations = node.reflection.name
105
- Bullet::Detector::Association.add_object_associations(ar_parent, associations)
106
- Bullet::Detector::NPlusOneQuery.call_association(ar_parent, associations)
107
- @bullet_eager_loadings[ar_parent.class] ||= {}
108
- @bullet_eager_loadings[ar_parent.class][ar_parent] ||= Set.new
109
- @bullet_eager_loadings[ar_parent.class][ar_parent] << associations
104
+ associations = [node.reflection.name]
105
+ if node.reflection.through_reflection?
106
+ associations << node.reflection.through_reflection.name
107
+ end
108
+ associations.each do |association|
109
+ Bullet::Detector::Association.add_object_associations(ar_parent, association)
110
+ Bullet::Detector::NPlusOneQuery.call_association(ar_parent, association)
111
+ @bullet_eager_loadings[ar_parent.class] ||= {}
112
+ @bullet_eager_loadings[ar_parent.class][ar_parent] ||= Set.new
113
+ @bullet_eager_loadings[ar_parent.class][ar_parent] << association
114
+ end
110
115
  end
111
116
  end
112
117
  end
@@ -119,12 +124,17 @@ module Bullet
119
124
  result = super
120
125
 
121
126
  if Bullet.start?
122
- associations = node.reflection.name
123
- Bullet::Detector::Association.add_object_associations(record, associations)
124
- Bullet::Detector::NPlusOneQuery.call_association(record, associations)
125
- @bullet_eager_loadings[record.class] ||= {}
126
- @bullet_eager_loadings[record.class][record] ||= Set.new
127
- @bullet_eager_loadings[record.class][record] << associations
127
+ associations = [node.reflection.name]
128
+ if node.reflection.through_reflection?
129
+ associations << node.reflection.through_reflection.name
130
+ end
131
+ associations.each do |association|
132
+ Bullet::Detector::Association.add_object_associations(record, association)
133
+ Bullet::Detector::NPlusOneQuery.call_association(record, association)
134
+ @bullet_eager_loadings[record.class] ||= {}
135
+ @bullet_eager_loadings[record.class][record] ||= Set.new
136
+ @bullet_eager_loadings[record.class][record] << association
137
+ end
128
138
  end
129
139
 
130
140
  result
@@ -251,6 +261,10 @@ module Bullet
251
261
  proxy_association.owner,
252
262
  proxy_association.reflection.name
253
263
  )
264
+ Bullet::Detector::NPlusOneQuery.call_association(
265
+ proxy_association.owner,
266
+ proxy_association.reflection.name
267
+ )
254
268
  end
255
269
  super(column_name)
256
270
  end
@@ -128,12 +128,17 @@ module Bullet
128
128
  id = row[key]
129
129
  next unless id.nil?
130
130
 
131
- associations = node.reflection.name
132
- Bullet::Detector::Association.add_object_associations(ar_parent, associations)
133
- Bullet::Detector::NPlusOneQuery.call_association(ar_parent, associations)
134
- @bullet_eager_loadings[ar_parent.class] ||= {}
135
- @bullet_eager_loadings[ar_parent.class][ar_parent] ||= Set.new
136
- @bullet_eager_loadings[ar_parent.class][ar_parent] << associations
131
+ associations = [node.reflection.name]
132
+ if node.reflection.through_reflection?
133
+ associations << node.reflection.through_reflection.name
134
+ end
135
+ associations.each do |association|
136
+ Bullet::Detector::Association.add_object_associations(ar_parent, association)
137
+ Bullet::Detector::NPlusOneQuery.call_association(ar_parent, association)
138
+ @bullet_eager_loadings[ar_parent.class] ||= {}
139
+ @bullet_eager_loadings[ar_parent.class][ar_parent] ||= Set.new
140
+ @bullet_eager_loadings[ar_parent.class][ar_parent] << association
141
+ end
137
142
  end
138
143
  end
139
144
  end
@@ -146,12 +151,17 @@ module Bullet
146
151
  result = super
147
152
 
148
153
  if Bullet.start?
149
- associations = node.reflection.name
150
- Bullet::Detector::Association.add_object_associations(record, associations)
151
- Bullet::Detector::NPlusOneQuery.call_association(record, associations)
152
- @bullet_eager_loadings[record.class] ||= {}
153
- @bullet_eager_loadings[record.class][record] ||= Set.new
154
- @bullet_eager_loadings[record.class][record] << associations
154
+ associations = [node.reflection.name]
155
+ if node.reflection.through_reflection?
156
+ associations << node.reflection.through_reflection.name
157
+ end
158
+ associations.each do |association|
159
+ Bullet::Detector::Association.add_object_associations(record, association)
160
+ Bullet::Detector::NPlusOneQuery.call_association(record, association)
161
+ @bullet_eager_loadings[record.class] ||= {}
162
+ @bullet_eager_loadings[record.class][record] ||= Set.new
163
+ @bullet_eager_loadings[record.class][record] << association
164
+ end
155
165
  end
156
166
 
157
167
  result
@@ -278,6 +288,10 @@ module Bullet
278
288
  proxy_association.owner,
279
289
  proxy_association.reflection.name
280
290
  )
291
+ Bullet::Detector::NPlusOneQuery.call_association(
292
+ proxy_association.owner,
293
+ proxy_association.reflection.name
294
+ )
281
295
  end
282
296
  super
283
297
  end
@@ -128,12 +128,17 @@ module Bullet
128
128
  id = row[key]
129
129
  next unless id.nil?
130
130
 
131
- associations = node.reflection.name
132
- Bullet::Detector::Association.add_object_associations(ar_parent, associations)
133
- Bullet::Detector::NPlusOneQuery.call_association(ar_parent, associations)
134
- @bullet_eager_loadings[ar_parent.class] ||= {}
135
- @bullet_eager_loadings[ar_parent.class][ar_parent] ||= Set.new
136
- @bullet_eager_loadings[ar_parent.class][ar_parent] << associations
131
+ associations = [node.reflection.name]
132
+ if node.reflection.through_reflection?
133
+ associations << node.reflection.through_reflection.name
134
+ end
135
+ associations.each do |association|
136
+ Bullet::Detector::Association.add_object_associations(ar_parent, association)
137
+ Bullet::Detector::NPlusOneQuery.call_association(ar_parent, association)
138
+ @bullet_eager_loadings[ar_parent.class] ||= {}
139
+ @bullet_eager_loadings[ar_parent.class][ar_parent] ||= Set.new
140
+ @bullet_eager_loadings[ar_parent.class][ar_parent] << association
141
+ end
137
142
  end
138
143
  end
139
144
  end
@@ -146,12 +151,17 @@ module Bullet
146
151
  result = super
147
152
 
148
153
  if Bullet.start?
149
- associations = node.reflection.name
150
- Bullet::Detector::Association.add_object_associations(record, associations)
151
- Bullet::Detector::NPlusOneQuery.call_association(record, associations)
152
- @bullet_eager_loadings[record.class] ||= {}
153
- @bullet_eager_loadings[record.class][record] ||= Set.new
154
- @bullet_eager_loadings[record.class][record] << associations
154
+ associations = [node.reflection.name]
155
+ if node.reflection.through_reflection?
156
+ associations << node.reflection.through_reflection.name
157
+ end
158
+ associations.each do |association|
159
+ Bullet::Detector::Association.add_object_associations(record, association)
160
+ Bullet::Detector::NPlusOneQuery.call_association(record, association)
161
+ @bullet_eager_loadings[record.class] ||= {}
162
+ @bullet_eager_loadings[record.class][record] ||= Set.new
163
+ @bullet_eager_loadings[record.class][record] << association
164
+ end
155
165
  end
156
166
 
157
167
  result
@@ -278,6 +288,10 @@ module Bullet
278
288
  proxy_association.owner,
279
289
  proxy_association.reflection.name
280
290
  )
291
+ Bullet::Detector::NPlusOneQuery.call_association(
292
+ proxy_association.owner,
293
+ proxy_association.reflection.name
294
+ )
281
295
  end
282
296
  super(column_name)
283
297
  end
@@ -137,12 +137,17 @@ module Bullet
137
137
  id = row[key]
138
138
  next unless id.nil?
139
139
 
140
- associations = node.reflection.name
141
- Bullet::Detector::Association.add_object_associations(ar_parent, associations)
142
- Bullet::Detector::NPlusOneQuery.call_association(ar_parent, associations)
143
- @bullet_eager_loadings[ar_parent.class] ||= {}
144
- @bullet_eager_loadings[ar_parent.class][ar_parent] ||= Set.new
145
- @bullet_eager_loadings[ar_parent.class][ar_parent] << associations
140
+ associations = [node.reflection.name]
141
+ if node.reflection.through_reflection?
142
+ associations << node.reflection.through_reflection.name
143
+ end
144
+ associations.each do |association|
145
+ Bullet::Detector::Association.add_object_associations(ar_parent, association)
146
+ Bullet::Detector::NPlusOneQuery.call_association(ar_parent, association)
147
+ @bullet_eager_loadings[ar_parent.class] ||= {}
148
+ @bullet_eager_loadings[ar_parent.class][ar_parent] ||= Set.new
149
+ @bullet_eager_loadings[ar_parent.class][ar_parent] << association
150
+ end
146
151
  end
147
152
  end
148
153
  end
@@ -155,12 +160,17 @@ module Bullet
155
160
  result = super
156
161
 
157
162
  if Bullet.start?
158
- associations = node.reflection.name
159
- Bullet::Detector::Association.add_object_associations(record, associations)
160
- Bullet::Detector::NPlusOneQuery.call_association(record, associations)
161
- @bullet_eager_loadings[record.class] ||= {}
162
- @bullet_eager_loadings[record.class][record] ||= Set.new
163
- @bullet_eager_loadings[record.class][record] << associations
163
+ associations = [node.reflection.name]
164
+ if node.reflection.through_reflection?
165
+ associations << node.reflection.through_reflection.name
166
+ end
167
+ associations.each do |association|
168
+ Bullet::Detector::Association.add_object_associations(record, association)
169
+ Bullet::Detector::NPlusOneQuery.call_association(record, association)
170
+ @bullet_eager_loadings[record.class] ||= {}
171
+ @bullet_eager_loadings[record.class][record] ||= Set.new
172
+ @bullet_eager_loadings[record.class][record] << association
173
+ end
164
174
  end
165
175
 
166
176
  result
@@ -294,6 +304,10 @@ module Bullet
294
304
  proxy_association.owner,
295
305
  proxy_association.reflection.name
296
306
  )
307
+ Bullet::Detector::NPlusOneQuery.call_association(
308
+ proxy_association.owner,
309
+ proxy_association.reflection.name
310
+ )
297
311
  end
298
312
  super(column_name)
299
313
  end
@@ -137,12 +137,17 @@ module Bullet
137
137
  id = row[key]
138
138
  next unless id.nil?
139
139
 
140
- associations = node.reflection.name
141
- Bullet::Detector::Association.add_object_associations(ar_parent, associations)
142
- Bullet::Detector::NPlusOneQuery.call_association(ar_parent, associations)
143
- @bullet_eager_loadings[ar_parent.class] ||= {}
144
- @bullet_eager_loadings[ar_parent.class][ar_parent] ||= Set.new
145
- @bullet_eager_loadings[ar_parent.class][ar_parent] << associations
140
+ associations = [node.reflection.name]
141
+ if node.reflection.through_reflection?
142
+ associations << node.reflection.through_reflection.name
143
+ end
144
+ associations.each do |association|
145
+ Bullet::Detector::Association.add_object_associations(ar_parent, association)
146
+ Bullet::Detector::NPlusOneQuery.call_association(ar_parent, association)
147
+ @bullet_eager_loadings[ar_parent.class] ||= {}
148
+ @bullet_eager_loadings[ar_parent.class][ar_parent] ||= Set.new
149
+ @bullet_eager_loadings[ar_parent.class][ar_parent] << association
150
+ end
146
151
  end
147
152
  end
148
153
  end
@@ -155,12 +160,17 @@ module Bullet
155
160
  result = super
156
161
 
157
162
  if Bullet.start?
158
- associations = node.reflection.name
159
- Bullet::Detector::Association.add_object_associations(record, associations)
160
- Bullet::Detector::NPlusOneQuery.call_association(record, associations)
161
- @bullet_eager_loadings[record.class] ||= {}
162
- @bullet_eager_loadings[record.class][record] ||= Set.new
163
- @bullet_eager_loadings[record.class][record] << associations
163
+ associations = [node.reflection.name]
164
+ if node.reflection.through_reflection?
165
+ associations << node.reflection.through_reflection.name
166
+ end
167
+ associations.each do |association|
168
+ Bullet::Detector::Association.add_object_associations(record, association)
169
+ Bullet::Detector::NPlusOneQuery.call_association(record, association)
170
+ @bullet_eager_loadings[record.class] ||= {}
171
+ @bullet_eager_loadings[record.class][record] ||= Set.new
172
+ @bullet_eager_loadings[record.class][record] << association
173
+ end
164
174
  end
165
175
 
166
176
  result
@@ -294,6 +304,10 @@ module Bullet
294
304
  proxy_association.owner,
295
305
  proxy_association.reflection.name
296
306
  )
307
+ Bullet::Detector::NPlusOneQuery.call_association(
308
+ proxy_association.owner,
309
+ proxy_association.reflection.name
310
+ )
297
311
  end
298
312
  super(column_name)
299
313
  end
@@ -24,6 +24,7 @@ class Object
24
24
  def bullet_join_potential_composite_primary_key(primary_keys)
25
25
  return send(primary_keys) unless primary_keys.is_a?(Enumerable)
26
26
 
27
- primary_keys.map { |primary_key| send primary_key }.join(',')
27
+ primary_keys.map { |primary_key| send primary_key }
28
+ .join(',')
28
29
  end
29
30
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bullet
4
- VERSION = '7.1.2'
4
+ VERSION = '7.1.4'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bullet
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.1.2
4
+ version: 7.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Huang
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-13 00:00:00.000000000 Z
11
+ date: 2023-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport