mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 05:02:24 +08:00
d25fd34b44
* 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. |
||
---|---|---|
.. | ||
reports | ||
anon_cache_invalidator.rb | ||
cached_counting.rb | ||
category_hashtag.rb | ||
has_custom_fields.rb | ||
has_destroyed_web_hook.rb | ||
has_search_data.rb | ||
has_url.rb | ||
limited_edit.rb | ||
positionable.rb | ||
roleable.rb | ||
searchable.rb | ||
second_factor_manager.rb | ||
stats_cacheable.rb | ||
trashable.rb |