ソースを参照

Fix sort column names in search query

master
Dylan Baker 5年前
コミット
27cafd6b40
1個のファイルの変更3行の追加3行の削除
  1. 3
    3
      lib/search.rb

+ 3
- 3
lib/search.rb ファイルの表示

@@ -12,11 +12,11 @@ def search(params)
12 12
     sort =
13 13
       case params[:sort]
14 14
       when 'thread'
15
-        'threads.created_at DESC'
15
+        'created_at DESC'
16 16
       when 'post'
17
-        'posts.created_at DESC'
17
+        'last_post_created_at DESC'
18 18
       else
19
-        'threads.created_at DESC'
19
+        'created_at DESC'
20 20
       end
21 21
     search_threads(db, query, username, sort, offset)
22 22
   when 'posts'

読み込み中…
キャンセル
保存