From ebe9772a238406b6f22898d1c8ea00ca46bec76c Mon Sep 17 00:00:00 2001 From: chiu Date: Tue, 13 Aug 2019 15:37:19 +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 b0a19c8..e5adfd1 100644 --- a/app/controllers/personal_journals_controller.rb +++ b/app/controllers/personal_journals_controller.rb @@ -83,7 +83,7 @@ class PersonalJournalsController < ApplicationController "total_pages" => journal_papers.total_pages, "choice" => {"choice_value" => choice_value ,"choice_show" => choice_show}, "url" => "/"+params[:locale]+params[:url], - "all" => JournalPaper.where(:is_hidden=>false).take(4).sort_by{ |tp| [-tp[:year].to_i,-tp[:publication_date].to_i] }, + "all" => JournalPaper.where(:is_hidden=>false).take(4).sort_by{ |tp| [-tp[:year].to_i,-tp[:publication_date].to_i] }[0].paper_title, "all_n" => JournalPaper.where(:is_hidden=>false).count } end