Bullet::Notification::UnoptimizedQueryError on rails specs

Viewed 540

I have a class inquiry_process that has_one inquiry, in my specs I have the following

let(:serializer) { described_class.new(inquiry_process, options) }
let(:options) do
  {
    include: %i[inquiry company assignee banks]
  }
end

Then I create a inquiry for inquiry_process

let(:inquiry) { build :inquiry, company: company, details: details, creator: creator }

And when I create the inquiry_process I am getting the following

 Bullet::Notification::UnoptimizedQueryError:
     
    USE eager loading detected
      Inquiry => [:partner_application]
      Add to your finder: :includes => [:partner_application]
    Call stack

How can I fix this

0 Answers
Related