discourse-docs/lib/docs
Osama Sayegh 312cafe9d7
DEV: Compatibility with Discourse on Rails 6.1 (#41)
Related to https://github.com/discourse/discourse/pull/12688.

The tags and categories count queries are failing on Rails 6.1 with `ERROR:  column "topics.bumped_at" must appear in the GROUP BY clause or be used in an aggregate function`. The reason these queries didn't fail prior to 6.1 was because Active Record would automatically drop the `ORDER BY` clause from the queries when we called `count` on them. This behavior has been [changed](5812feffe3) in 6.1 so now Active Record only drops the `ORDER BY` clause if there is no `GROUP BY` clause. Our queries do have `GROUP BY` clauses, so we need to drop the `ORDER BY` clauses ourselves before we call `count` to make them work on 6.1.
2021-04-15 19:17:26 +03:00
..
engine.rb FEATURE: Rename from Knowledge Explorer to Docs (#27) 2021-01-18 10:38:09 -06:00
query.rb DEV: Compatibility with Discourse on Rails 6.1 (#41) 2021-04-15 19:17:26 +03:00