discourse/app/models/concerns
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
..
reports DEV: Update rubocop-discourse from 2.3.2 to 2.4.0 (#11079) 2020-10-30 15:04:29 +01:00
anon_cache_invalidator.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
cached_counting.rb DEV: s/\$redis/Discourse\.redis (#8431) 2019-12-03 10:05:53 +01:00
category_hashtag.rb FIX: Improve category hashtag lookup (#10133) 2020-07-07 10:19:01 +10:00
has_custom_fields.rb DEV: Better custom field preload error (#11044) 2020-10-27 10:05:07 -05:00
has_destroyed_web_hook.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
has_search_data.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
has_url.rb DEV: Make site setting type uploaded_image_list use upload IDs (#10401) 2020-10-13 16:17:06 +03:00
limited_edit.rb REFACTOR: Edit title respects min trust to edit post 2020-02-05 10:36:24 -07:00
positionable.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
roleable.rb FEATURE: set notification levels when added to a group (#10378) 2020-08-06 12:27:27 -04:00
searchable.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
second_factor_manager.rb FIX: TOTP could not be used on sites with colons in their names 2020-02-20 16:35:30 -05:00
stats_cacheable.rb DEV: s/\$redis/Discourse\.redis (#8431) 2019-12-03 10:05:53 +01:00
trashable.rb DEV: Remove with_deleted workarounds for old Rails version (#11550) 2020-12-22 10:38:59 +11:00