We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We have a model like this
class Consumer < ApplicationRecord has_many :offers, dependent: :destroy end class Offer < ApplicationRecord has_many :incidents, dependent: :destroy end
When we try to destroy the consumer with consumer.destory! we get this unexpected error
consumer.destory!
Minitest::UnexpectedError: Bullet::Notification::UnoptimizedQueryError: user: pisz DELETE /consumers/b900b64f-1f30-4694-980f-4bbc029b5c10/delete USE eager loading detected Offer => [:incidents] Add to your query: .includes([:incidents])
How I may add includes to offer.incidents?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
We have a model like this
When we try to destroy the consumer with
consumer.destory!
we get this unexpected error
How I may add includes to offer.incidents?
The text was updated successfully, but these errors were encountered: