salsify / goldiloader

Just the right amount of Rails eager loading
MIT License
1.61k stars 53 forks source link

[bug] undefined method `auto_include' for #<ActiveRecord::Relation #160

Closed Epigene closed 1 month ago

Epigene commented 1 month ago

Hello,

I'm using Goldiloader v5.3.0 and sometimes I get NoMethodError: undefined method 'auto_include' for #<ActiveRecord::Relation, which seems impossible. I know this is occurring inside a tricky scope-using :through association:

has_many :things, -> { where(latest_revision: true).auto_include(false) }, through: :other_things

Any insight as to what might be going wrong?

Epigene commented 1 month ago

Pfft, false alarm, people had mis-merged Gemfile and omitted the gem itself.