discourse/spec
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
..
components FEATURE: Allow parameter authentication for UserApiKeys (#9742) 2020-05-12 13:35:36 +01:00
fabricators FEATURE: Include optimized thumbnails for topics (#9215) 2020-05-05 09:07:50 +01:00
fixtures FEATURE: Include category position when exporting categories (#9658) 2020-05-07 12:17:15 +10:00
helpers DEV: Fix some more flaky tests (#9384) 2020-04-08 12:46:43 +02:00
import_export FEATURE: Rake task to export groups (#9450) 2020-04-17 14:59:54 -07:00
initializers FIX: We need to skip users with associated reviewables when auto-approving (#9080) 2020-03-02 14:33:52 -05:00
integration FEATURE: Allow parameter authentication for UserApiKeys (#9742) 2020-05-12 13:35:36 +01:00
integrity DEV: Adds an integrity spec for JS constants 2020-05-12 12:23:36 -04:00
jobs DEV: Remove all code referencing at_desktop bookmark reminders (#9650) 2020-05-06 15:22:43 +10:00
lib FIX: Do not allow null options for bookmark manager 2020-05-08 15:24:59 +00:00
mailers DEV: Add rubocop-rspec (#9288) 2020-03-27 17:35:40 +01:00
models FIX: Prevent column name conflicts in reviewable code (#9753) 2020-05-13 09:05:56 +10:00
multisite FIX: Change secure media to encompass attachments as well (#9271) 2020-03-26 07:16:02 +10:00
requests FEATURE: Support for App Shortcuts Menu (#9749) 2020-05-12 12:24:33 -03:00
script/import_scripts FIX: Change base importer to create new Bookmark records (#9603) 2020-05-01 11:34:55 +10:00
serializers FEATURE: Include optimized thumbnails for topics (#9215) 2020-05-05 09:07:50 +01:00
services FIX: correct edit notification username for PMs (#9649) 2020-05-07 07:52:21 +10:00
support DEV: Use response.parsed_body in specs (#9615) 2020-05-07 17:04:12 +02:00
tasks FEATURE: Promote bookmarks with reminders to core functionality (#9369) 2020-04-22 13:44:19 +10:00
views/omniauth_callbacks FEATURE: Use full page redirection for all external auth methods (#8092) 2019-10-08 12:10:43 +01:00
rails_helper.rb DEV: upgrade Rails 2020-04-20 12:55:53 +01:00
swagger_helper.rb DEV: Add rswag to aid in api documention (#9546) 2020-04-27 16:40:07 -06:00