From 3c625279291331887c2c05e36e3d3809f1a734f4 Mon Sep 17 00:00:00 2001 From: chiu Date: Thu, 15 Aug 2019 10:46:07 +0800 Subject: [PATCH] Update personal_conferences_controller.rb --- app/controllers/personal_conferences_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/personal_conferences_controller.rb b/app/controllers/personal_conferences_controller.rb index f175f13..362dacd 100644 --- a/app/controllers/personal_conferences_controller.rb +++ b/app/controllers/personal_conferences_controller.rb @@ -40,7 +40,7 @@ class PersonalConferencesController < ApplicationController when "period" writing_conferences_show = writing_conferences_temp.select {|value| search_all_words(value.duration, params[:keywords])} when "publication_date" - writing_conferences_show = writing_conferences_temp.select {|value| search_all_words(value.send("publication_date").strftime("%Y/%m/%d"), params[:keywords])} + writing_conferences_show = writing_conferences_temp.select {|value| search_all_words((value.send("publication_date").strftime("%Y/%m/%d") rescue ""), params[:keywords])} when "author_type" writing_conferences_show = writing_conferences_temp.select {|value| search_all_words(value.conference_author_types.collect{|cat| cat.title}.join(", "), params[:keywords])} when "language"