From 6086b25db7bd37f587b041357207ed5db91ffdee Mon Sep 17 00:00:00 2001 From: z9hang Date: Thu, 15 May 2014 09:19:59 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=B4=E5=90=A7=E5=B8=96=E5=AD=90=E5=80=92?= =?UTF-8?q?=E5=BA=8F=E5=8E=BB=E6=8E=89=E6=A5=BC=E5=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/memos_controller.rb | 2 +- app/views/memos/show.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/memos_controller.rb b/app/controllers/memos_controller.rb index 20f0b45c4..b4de06fb6 100644 --- a/app/controllers/memos_controller.rb +++ b/app/controllers/memos_controller.rb @@ -94,7 +94,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 diff --git a/app/views/memos/show.html.erb b/app/views/memos/show.html.erb index 6ea5b17bc..a40ee631a 100644 --- a/app/views/memos/show.html.erb +++ b/app/views/memos/show.html.erb @@ -65,7 +65,7 @@ <% pages_count = @reply_pages.offset %> <% @replies.each do |reply| %>
"> -

<%= pages_count += 1 %>楼 :

+

<%= pages_count += 1 %>楼 :