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

Loading…
Cancel
Save