浏览代码

Accidentally removed order clause

master
Dylan Baker 3 年前
父节点
当前提交
64c0eaf641
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1
    0
      lib/search.rb

+ 1
- 0
lib/search.rb 查看文件

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')

正在加载...
取消
保存