From 037d488a217058c9c77ef55f217e7a398c5d2c1f Mon Sep 17 00:00:00 2001 From: chiu Date: Tue, 13 Aug 2019 16:09:18 +0800 Subject: [PATCH] Update personal_journals_controller.rb --- app/controllers/personal_journals_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/personal_journals_controller.rb b/app/controllers/personal_journals_controller.rb index 9c2885b..f6a667b 100644 --- a/app/controllers/personal_journals_controller.rb +++ b/app/controllers/personal_journals_controller.rb @@ -40,7 +40,6 @@ class PersonalJournalsController < ApplicationController else journal_papers_show = journal_papers_temp.select {|value| value.send(params[:selectbox]).to_s.include? params[:keywords]} end - journal_papers.total_pages = (journal_papers_temp.length / OrbitHelper.page_data_count.to_f).ceil if params[:page_no].nil? page_to_show = 1 else @@ -48,6 +47,7 @@ class PersonalJournalsController < ApplicationController end journal_papers_show_last = journal_papers_show[(page_to_show-1)*OrbitHelper.page_data_count...page_to_show*OrbitHelper.page_data_count] journal_papers = journal_papers_show_last + journal_papers.total_pages = (journal_papers_temp.length / OrbitHelper.page_data_count.to_f).ceil else end journal_paper_list = []