From 68ad3d77706b5f5d5c156c114111f8f0f875a8eb Mon Sep 17 00:00:00 2001 From: chiu Date: Thu, 15 Aug 2019 10:42:46 +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 e6362c0..60551bc 100644 --- a/app/controllers/personal_journals_controller.rb +++ b/app/controllers/personal_journals_controller.rb @@ -37,7 +37,7 @@ class PersonalJournalsController < ApplicationController when "level_type" journal_papers_show = journal_papers_temp.select {|value| search_all_words(value.journal_levels.collect{|x| x.title}.join(', ').to_s, params[:keywords])} when "publication_date" - journal_papers_show = journal_papers_temp.select {|value| search_all_words(value.send("publication_date").strftime("%Y/%m/%d") rescue "", params[:keywords])} + journal_papers_show = journal_papers_temp.select {|value| (search_all_words(value.send("publication_date").strftime("%Y/%m/%d") rescue ""), params[:keywords])} when "author_type" journal_papers_show = journal_papers_temp.select {|value| search_all_words(value.journal_paper_author_types.collect{|jat| jat.title}.join(", "), params[:keywords])} when "language"