帖子展示错误

guange_homework
lizanle 10 years ago
parent da2b027f04
commit 422e07fa48

@ -141,7 +141,7 @@ class ForumsController < ApplicationController
@topic_pages = Paginator.new @topic_count, per_page_option, params['page'] @topic_pages = Paginator.new @topic_count, per_page_option, params['page']
@memos = @forum.topics. @memos = @forum.topics.
# reorder("#{Memo.table_name}.sticky DESC"). # reorder("#{Memo.table_name}.sticky DESC").
includes(:last_reply).where("last_replies_memos.parent_id is null and #{Memo.table_name}.parent_id is null"). includes(:last_reply).
limit(@topic_pages.per_page). limit(@topic_pages.per_page).
offset(@topic_pages.offset). offset(@topic_pages.offset).
reorder(order). reorder(order).

Loading…
Cancel
Save