We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 088269e commit daaba73Copy full SHA for daaba73
lib/identity_cache/cached/prefetcher.rb
@@ -37,7 +37,7 @@ def prefetch(klass, associations, records, load_strategy: LoadStrategy::Eager)
37
private
38
39
def fetch_association(load_strategy, klass, association, records, &block)
40
- unless records.first.class.should_use_cache?
+ unless klass.should_use_cache?
41
ActiveRecord::Associations::Preloader.new.preload(records, association)
42
return yield
43
end
0 commit comments