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
I noticed an error when "tagged_with" is used together with "includes".
I added a failing test case here: krautcomputing/rocket_tag@e66410b0a9feac87a69aeb14bae90511847a3fcc
The error occurs quite deep in Active Record:
NoMethodError: undefined method `left' for :count:Symbol
# /Users/me/.rbenv/versions/1.9.3-p327-perf/lib/ruby/gems/1.9.1/gems/activerecord-3.2.6/lib/active_record/associations/alias_tracker.rb:64:in `block in initial_count_for'
SELECT "taggable_models".* FROM (SELECT count("tags"."id") AS tags_count, taggable_models.* FROM "taggable_models" INNER JOIN "taggings" ON "taggings"."taggable_id" = "taggable_models"."id" AND "taggings"."taggable_type" = 'TaggableModel' INNER JOIN "tags" ON "tags"."id" = "taggings"."tag_id" WHERE "tags"."name" IN ('foo') GROUP BY "taggable_models"."id", "taggable_models"."user_id", "taggable_models"."name", "taggable_models"."type", "taggable_models"."foo" ORDER BY tags_count desc) taggable_models
I will investigate further what may cause this error but all tips are appreciated! :)
The text was updated successfully, but these errors were encountered:
I noticed an error when "tagged_with" is used together with "includes".
I added a failing test case here: krautcomputing/rocket_tag@e66410b0a9feac87a69aeb14bae90511847a3fcc
The error occurs quite deep in Active Record:
It seems to have to do with using
count
in the subquery. See the full stack trace here: https://gist.github.com/4363280I will investigate further what may cause this error but all tips are appreciated! :)
The text was updated successfully, but these errors were encountered: