From 554407a1f6ee17a3443f0b59fce740ae09203d1a Mon Sep 17 00:00:00 2001 From: chiu Date: Thu, 15 Aug 2019 10:41:52 +0800 Subject: [PATCH] Update personal_journals_controller.rb fix error --- 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 59dd7c2..e6362c0 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"), 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"