From 9ca1d8b93acebdef945311a9de7fb15e6595a874 Mon Sep 17 00:00:00 2001 From: chiu Date: Tue, 13 Aug 2019 16:17:34 +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 f6a667b..f5a7a2a 100644 --- a/app/controllers/personal_journals_controller.rb +++ b/app/controllers/personal_journals_controller.rb @@ -100,7 +100,7 @@ class PersonalJournalsController < ApplicationController "choice" => {"choice_value" => choice_value ,"choice_show" => choice_show}, "url" => "/"+params[:locale]+params[:url], "all" => journal_papers_show_last, - "all_n" => JournalPaper.where(:is_hidden=>false).count + "all_n" => JournalPaper.where(:is_hidden=>false).take(100).sort_by{ |tp| [-tp[:year].to_i,-tp[:publication_date].to_i] }.select {|value| value.paper_title.include? "1"} } end