贴吧帖子倒序去掉楼层

This commit is contained in:
z9hang 2014-05-15 09:19:59 +08:00
parent 7137f2663c
commit 6086b25db7
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -65,7 +65,7 @@
<% pages_count = @reply_pages.offset %>
<% @replies.each do |reply| %>
<div class="reply" id="<%= "reply-#{reply.id}" %>">
<p class="font_lighter"><%= pages_count += 1 %>楼 :</p>
<p class="font_lighter"><span style="display: none"><%= pages_count += 1 %>楼 :</span></p>
<div class="contextual-borad">
<!-- <%= link_to(
image_tag('comment.png'),