discourse/app
Martin Brennan 9981fa4466
FIX: Prevent column name conflicts in reviewable code (#9753)
We were getting errors like this in Reviewables in some cases:

```
ActiveRecord::StatementInvalid (PG::AmbiguousColumn: ERROR:  column reference "category_id" is ambiguous
LINE 4: ...TRUE) OR (reviewable_by_group_id IN (NULL))) AND (category_i...
```

The problem that was making everything go boom is that plugins can add their own custom filters for Reviewables. If one is doing an INNER JOIN on topics, which has its own category_id column, we would get the above AmbiguousColumn error. The solution here is to just make all references to the reviewable columns in the list_for and viewable_by code prefixed by the table name e.g. reviewables.category_id.
2020-05-13 09:05:56 +10:00
..
assets Revert "Revert "DEV: Remove Discourse.Route"" 2020-05-12 14:15:07 -04:00
controllers FEATURE: Support for App Shortcuts Menu (#9749) 2020-05-12 12:24:33 -03:00
helpers FEATURE: Nokogumbo (#9577) 2020-05-05 13:46:57 +10:00
jobs DEV: minor SQL formatting change 2020-05-12 16:55:42 +10:00
mailers FIX: Change user digest email total unread notification calculation (#9648) 2020-05-06 14:23:13 +10:00
models FIX: Prevent column name conflicts in reviewable code (#9753) 2020-05-13 09:05:56 +10:00
serializers FIX: Show Settings button if plugin has settings (#9728) 2020-05-12 11:18:19 +03:00
services FIX: correct edit notification username for PMs (#9649) 2020-05-07 07:52:21 +10:00
views FIX: Multiple schema.org improvements 2020-05-11 20:38:49 +03:00