FEATURE: in:unsolved filter
This commit is contained in:
parent
7ebd56665b
commit
8011731aa0
10
plugin.rb
10
plugin.rb
|
@ -201,6 +201,16 @@ after_initialize do
|
||||||
)")
|
)")
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Search.advanced_filter(/in:unsolved/) do |posts|
|
||||||
|
posts.where("topics.id NOT IN (
|
||||||
|
SELECT tc.topic_id
|
||||||
|
FROM topic_custom_fields tc
|
||||||
|
WHERE tc.name = 'accepted_answer_post_id' AND
|
||||||
|
tc.value IS NOT NULL
|
||||||
|
)")
|
||||||
|
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
require_dependency 'topic_list_item_serializer'
|
require_dependency 'topic_list_item_serializer'
|
||||||
|
|
Loading…
Reference in New Issue