diff --git a/app/controllers/personal_projects_controller.rb b/app/controllers/personal_projects_controller.rb index 843dbd4..ed546c1 100644 --- a/app/controllers/personal_projects_controller.rb +++ b/app/controllers/personal_projects_controller.rb @@ -23,7 +23,7 @@ class PersonalProjectsController < ApplicationController projects_temp = Project.where(:is_hidden=>false).sort_by{ |tp| [-tp[:year].to_i,-tp[:publication_date].to_i] } case params[:selectbox] when "project_type" - projects_show = projects_temp.select {|value| search_all_words(value.send("project_type").title.to_s, params[:keywords])} + projects_show = projects_temp.select {|value| search_all_words((value.send("project_type").title rescue ""), params[:keywords])} when "project_title","default" projects_show = projects_temp.select {|value| search_all_words(value.send("project_title").to_s, params[:keywords])} when "period"