discourse/plugins
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
..
discourse-details DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
discourse-local-dates Revert "Revert "DEV: Wrap `Ember.run.debounce`. (#11352)"" (#11509) 2020-12-18 10:18:52 -03:00
discourse-narrative-bot Update translations (#11492) 2020-12-15 15:25:10 +01:00
discourse-presence Update translations (#11492) 2020-12-15 15:25:10 +01:00
lazy-yt DEV: enforces eslint’s curly rule to the codebase (#10720) 2020-09-22 16:28:28 +02:00
poll DEV: Remove with_deleted workarounds for old Rails version (#11550) 2020-12-22 10:38:59 +11:00
styleguide DEV: Add site header organism to styleguide (#11495) 2020-12-15 12:48:47 -05:00