From b30bfd073c9972205682cbcd48eda23f7a2ce222 Mon Sep 17 00:00:00 2001 From: linhk <304431313@.com> Date: Thu, 21 Aug 2014 16:55:46 +0800 Subject: [PATCH] 1 --- app/controllers/projects_controller.rb | 2 +- app/controllers/words_controller.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 3fea454de..329159a05 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -407,7 +407,7 @@ class ProjectsController < ApplicationController @page = @page.to_i # Find the page of the requested reply @jours = @project.journals_for_messages.where('m_parent_id IS NULL').order('created_on DESC') - @limit = 3 + @limit = 10 offset = @jours.count(:conditions => ["#{JournalsForMessage.table_name}.id > ?", params[:r].to_i]) page = 1 + offset / @limit diff --git a/app/controllers/words_controller.rb b/app/controllers/words_controller.rb index e31bb2738..2d03b2112 100644 --- a/app/controllers/words_controller.rb +++ b/app/controllers/words_controller.rb @@ -99,7 +99,7 @@ class WordsController < ApplicationController @project = Project.find params[:project_id] # Find the page of the requested reply @jours = @project.journals_for_messages.where('m_parent_id IS NULL').order('created_on DESC') - @limit = 3 + @limit = 10 offset = @jours.count(:conditions => ["#{JournalsForMessage.table_name}.id > ?", params[:r].to_i]) page = 1 + offset / @limit