FEATURE: in:first for searching first post

This commit is contained in:
Sam
2015-06-23 13:39:40 +10:00
parent e85df6b876
commit 63351d5629
3 changed files with 10 additions and 2 deletions

View File

@@ -179,6 +179,9 @@ class Search
posts.where("topics.posts_count = ?", match.to_i)
end
advanced_filter(/in:first/) do |posts|
posts.where("posts.post_number = 1")
end
advanced_filter(/in:(likes|bookmarks)/) do |posts, match|
if @guardian.user