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
Now when we load an object with associations, bullet tells us to includes([:foo]) to our code, that is really nice.
But when we test the same class object which does have an empty array of associations, then bullet tells us to remove the includes.
How to avoid this problems?
def show
# when the object foo exists we need the includes, when the object does not exists bullet says -> remove includes
foo = Foo.includes(:bars).find(params[:id])
rescue ActiveRecord::RecordNotFound
...
end
The text was updated successfully, but these errors were encountered:
Hello,
is there a Guide how to write spec tests?
We have enabled Bullet.raise in our specs.
Now when we load an object with associations, bullet tells us to includes([:foo]) to our code, that is really nice.
But when we test the same class object which does have an empty array of associations, then bullet tells us to remove the includes.
How to avoid this problems?
The text was updated successfully, but these errors were encountered: