Closed bigardone closed 11 years ago
acts_as
is a has_one
relation, and there are no second order relations to include!
If you have a model that has_many :buyer
for example you can add include :as_client
, ie has_many :buyers, include: :as_client
.
Or if you don't know whats the association name has_many :buyers, include: acts_as_association_name(:client)
including supermodel is default behavior in 1.0.0 and 0.1.3
Hi! How can I prevent N+1 queries? I have the following models
Every time I search for Buyers or Sellers, the bullet gem warns me about N+1 queries detected as it follows:
I've tried with this param
And even overriding the default_scope like this
But it keeps me giving me the same warning. What am I doing wrong? Thanks in advance!