discourse/plugins/poll
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
..
app DEV: Remove with_deleted workarounds for old Rails version (#11550) 2020-12-22 10:38:59 +11:00
assets DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
config Update translations (#11492) 2020-12-15 15:25:10 +01:00
db FEATURE: Add the title attribute to polls (#10759) 2020-10-02 09:21:24 +02:00
jobs/regular DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
lib FEATURE: Add the title attribute to polls (#10759) 2020-10-02 09:21:24 +02:00
spec FIX: hides votes from regular users when poll is staff only (#11342) 2020-11-24 22:19:06 +01:00
test/javascripts DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
plugin.rb FEATURE: Add the title attribute to polls (#10759) 2020-10-02 09:21:24 +02:00