2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 10:50:21 +08:00

Add backend code for searching posts with images.

This commit is contained in:
Jakub Macina 2017-06-07 20:13:36 +02:00
parent 8f7d81fde6
commit 76712da166
2 changed files with 7 additions and 2 deletions

View file

@ -338,6 +338,10 @@ class Search
end
end
advanced_filter(/in:image/) do |posts|
posts.where("posts.image_url IS NOT NULL")
end
advanced_filter(/category:(.+)/) do |posts,match|
exact = false