FEATURE: search all solved topics with in:solved
This commit is contained in:
parent
667ec087a0
commit
7ebd56665b
15
plugin.rb
15
plugin.rb
|
@ -188,6 +188,21 @@ after_initialize do
|
|||
end
|
||||
end
|
||||
|
||||
require_dependency 'search'
|
||||
|
||||
#TODO Remove when plugin is 1.0
|
||||
if Search.respond_to? :advanced_filter
|
||||
Search.advanced_filter(/in:solved/) do |posts|
|
||||
posts.where("topics.id 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
|
||||
|
||||
require_dependency 'topic_list_item_serializer'
|
||||
|
||||
class ::TopicListItemSerializer
|
||||
|
|
Loading…
Reference in New Issue