squeel
squeel copied to clipboard
Not compatible with Rails 4 count distinct
Without squeel:
User.select(:username).distinct.count
Generates:
SELECT DISTINCT COUNT(DISTINCT "users"."username") FROM "users"
With squeel:
SELECT DISTINCT COUNT(DISTINCT ) FROM "users"
Which would cause syntax error. Tested with Rails 4.1.8 and pg 0.17.1 (PostgreSQL 9.3.5)
This caused: https://github.com/charlotte-ruby/impressionist/issues/178