DEV: Remove duplicated scope.

`.joins(:topic)` will automatically add the `deleted_at IS NULL` scope.
This commit is contained in:
Guo Xiang Tan 2019-04-02 10:46:59 +08:00
parent 1c0f885a5b
commit 4b0ac91bfb

View File

@ -734,7 +734,6 @@ class Search
posts = Post.where(post_type: Topic.visible_post_types(@guardian.user))
.joins(:post_search_data, :topic)
.joins("LEFT JOIN categories ON categories.id = topics.category_id")
.where("topics.deleted_at" => nil)
is_topic_search = @search_context.present? && @search_context.is_a?(Topic)