You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
USE eager loading detected
User => [:profile]
Add to your query: .includes([:profile])
in my require_enabled_profile method.
I double checked that current_user.association(:profile).loaded? returns true in require_enabled_profile method(before unless). And enabled? method of profile does no any queries and just returns true or false.
Does it mean that bullet will indicate association loading as n+1 even if such associations were preloaded via ActiveRecord::Associations::Preloader.?
Bullet version: 7.1.6
Rails version: 7.0.8
The text was updated successfully, but these errors were encountered:
I have
before_action
method which checks if profile of current user is enabledand I am still getting error
in my
require_enabled_profile
method.I double checked that
current_user.association(:profile).loaded?
returns true inrequire_enabled_profile
method(beforeunless
). Andenabled?
method ofprofile
does no any queries and just returns true or false.Does it mean that
bullet
will indicate association loading asn+1
even if such associations were preloaded viaActiveRecord::Associations::Preloader.
?Bullet version: 7.1.6
Rails version: 7.0.8
The text was updated successfully, but these errors were encountered: