This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app
David Taylor d25fd34b44
DEV: Remove with_deleted workarounds for old Rails version (#11550)
* DEV: Remove with_deleted workarounds for old Rails version

These workarounds using private APIs are no longer required in the latest version of Rails. The referenced issue (https://github.com/rails/rails/issues/4306) was closed in 2013. The acts_as_paranoid workaround which this was based on was removed for rails > 5.

Switching to using a scope also allows us to use it within a `belongs_to` relation (e.g. in the Poll model). This avoids issues which can be caused by unscoping all `where` clauses.

Predicates are not necessarily strings, so calling `.join(" AND ")` can sometimes cause weird errors. If we use `WhereClause#ast`, and then `.to_sql` we achieve the same thing with fully public APIs, and it will work successfully for all predicates.
2020-12-22 10:38:59 +11:00
..
assets FIX: Autoplay videos must always be muted (#11533) 2020-12-21 14:55:00 -03:00
controllers FEATURE: Do not disturb (#11484) 2020-12-18 09:03:51 -06:00
helpers UX: Use appropriate logo on static pages (#11211) 2020-11-12 10:50:55 -08:00
jobs FIX: no email when the category is muted and mailing list is on (#11490) 2020-12-16 09:30:21 +11:00
mailers FIX: Ensure group SMTP and message builder always uses from address for Reply-To when IMAP is enabled (#11037) 2020-10-28 07:01:58 +10:00
models DEV: Remove with_deleted workarounds for old Rails version (#11550) 2020-12-22 10:38:59 +11:00
serializers FEATURE: Do not disturb (#11484) 2020-12-18 09:03:51 -06:00
services FEATURE: Do not disturb (#11484) 2020-12-18 09:03:51 -06:00
views Move CSS link tags above JS in the head 2020-11-17 09:57:30 -05:00