The problem I guess is that it instantiates all those AR objects.
The docs for count suggest that you should be able to include other
objects. This is listed as a class method though and looks like
it’s marked as depricated.
The docs for count suggest that you should be able to include other
objects. This is listed as a class method though and looks like
it’s marked as depricated.
Ok I’ve just had a quick look at this. If this doesn’t work then I’ll have to wait a bit before I can explore it. The calculate method requires a column to be specified.
The include option is not included in the calculate method. The
sql error that I got was due to the included table not being included
as a JOIN operation.
Instead you need to use the old school and verbose :join option
Sorry But I can’t spend any more time on this at the moment. If
it’s still a problem if someone else can step in or it’ll have to wait
until I get home.