Browse Source

Accidentally removed order clause

master
Dylan Baker 2 years ago
parent
commit
64c0eaf641
1 changed files with 1 additions and 0 deletions
  1. 1
    0
      lib/search.rb

+ 1
- 0
lib/search.rb View File

@@ -81,6 +81,7 @@ def search_posts(q, username, from_date, to_date, offset, exact_match)
81 81
     .where(Sequel.lit("posts.created_at >= ? OR ? IS NULL", to_date, to_date))
82 82
     .limit(RESULTS_PER_PAGE)
83 83
     .offset(Sequel.lit('?', offset))
84
+    .order(Sequel.desc(Sequel.lit('posts.created_at')))
84 85
 
85 86
   if exact_match
86 87
     query.full_text_search(:body, q, phrase: true, language: 'english')

Loading…
Cancel
Save