FEATURE: Add min_post_count search filter

This commit is contained in:
cpradio
2016-11-28 09:57:18 -05:00
parent 753a65833a
commit 66ca6d622e
5 changed files with 31 additions and 26 deletions

View File

@@ -252,6 +252,10 @@ class Search
posts.where("topics.posts_count = ?", match.to_i)
end
advanced_filter(/min_post_count:(\d+)/) do |posts, match|
posts.where("topics.posts_count >= ?", match.to_i)
end
advanced_filter(/in:first/) do |posts|
posts.where("posts.post_number = 1")
end