From 80472eec7a1071644101f4a9c6d8e6d7bac9a2b5 Mon Sep 17 00:00:00 2001 From: chiu Date: Fri, 16 Aug 2019 10:00:30 +0800 Subject: [PATCH] Update personal_patents_controller.rb fix error --- app/controllers/personal_patents_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/personal_patents_controller.rb b/app/controllers/personal_patents_controller.rb index c68c49a..25b8cad 100644 --- a/app/controllers/personal_patents_controller.rb +++ b/app/controllers/personal_patents_controller.rb @@ -25,7 +25,7 @@ class PersonalPatentsController < ApplicationController when "publish_date", "application_date", "end_date" patents_show = patents_temp.select {|value| search_all_words((value.send(params[:selectbox]).strftime("%Y/%m/%d") rescue ""), params[:keywords])} when "patent_category" - patent_show = patents_temp.select {|value| search_all_words(value.patent_types.collect{|pt| pt.title}.join(", "), params[:keywords])} + patent_show = patents_temp.select {|value| search_all_words((value.patent_types.collect{|pt| pt.title}.join(", ") rescue ""), params[:keywords])} when "author_type" patents_show = patents_temp.select {|value| search_all_words(value.patent_author_types.collect{|pt| pt.title}.join(", "), params[:keywords])} when "language"