From c06b4f270401886c36a25902749a532061c34527 Mon Sep 17 00:00:00 2001 From: yanxd Date: Tue, 17 Dec 2013 21:09:20 +0800 Subject: [PATCH] bug with memo paginate. --- app/views/memos/show.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/memos/show.html.erb b/app/views/memos/show.html.erb index 5e2c83790..af02df499 100644 --- a/app/views/memos/show.html.erb +++ b/app/views/memos/show.html.erb @@ -45,7 +45,7 @@

<%= l(:label_reply_plural) %> (<%= @replies.nil? ? 0 : @replies.size %>)

- <% pages_count = (params['page'].to_i - 1) * 10 %> + <% pages_count = (params['page'].to_i - 1) < 0 ? 0 : ((params['page'].to_i - 1) * 10) %> <% @replies.each do |reply| %>
">

<%= pages_count += 1 %>楼 :