From 53c228622f59062c3e32675478817a0d3fc94115 Mon Sep 17 00:00:00 2001 From: chiu Date: Thu, 15 Aug 2019 09:26:11 +0800 Subject: [PATCH] Update personal_journals_controller.rb --- app/controllers/personal_journals_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/personal_journals_controller.rb b/app/controllers/personal_journals_controller.rb index b0269b6..f27e685 100644 --- a/app/controllers/personal_journals_controller.rb +++ b/app/controllers/personal_journals_controller.rb @@ -25,9 +25,9 @@ class PersonalJournalsController < ApplicationController ] end if params[:selectbox] !=nil - journal_papers = JournalPaper.where(:is_hidden=>false) - journal_papers_count = journal_papers.count - journal_papers_temp = journal_papers.take(journal_papers_count).sort_by{ |tp| [-tp[:year].to_i,-tp[:publication_date].to_i] } + journal_papers_temp = JournalPaper.where(:is_hidden=>false).sort_by{ |tp| [-tp[:year].to_i,-tp[:publication_date].to_i] } + #journal_papers_count = journal_papers.count + #journal_papers_temp = journal_papers.take(journal_papers_count).sort_by{ |tp| [-tp[:year].to_i,-tp[:publication_date].to_i] } case params[:selectbox] when "paper_title","default" if page.custom_string_field == "table"