解决当帖子回复条件为空排列次序错误

This commit is contained in:
linhk 2014-08-05 14:02:39 +08:00
parent 65174ad8ef
commit 3862f857f7
1 changed files with 1 additions and 1 deletions

View File

@ -84,7 +84,7 @@ class MemosController < ApplicationController
@reply_pages = Paginator.new @reply_count, pre_count, page
@replies = @memo.children.
includes(:author, :attachments).
reorder("#{Memo.table_name}.created_at ASC").
reorder("#{Memo.table_name}.created_at DESC").
limit(@reply_pages.per_page).
offset(@reply_pages.offset).
all