Update personal_conferences_controller.rb

搜尋功能改為可用空格區分不同要搜尋的字且不分大小寫
This commit is contained in:
chiu 2019-08-15 09:50:35 +08:00
parent 609a1c83ba
commit 7b52a160a2
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ class PersonalConferencesController < ApplicationController
when "paper_types"
writing_conferences_show = writing_conferences_temp.select {|value| search_all_words(value.conference_paper_types.collect{|x| x.title}.join(', ').to_s, params[:keywords])}
when "period"
writing_conferences_show = writing_conferences_temp.select {|value| search_all_words(value.duration.include? params[:keywords]}
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").collect{|x| x.title}.join(', '), params[:keywords])}
when "author_type"