Update personal_conferences_controller.rb

This commit is contained in:
chiu 2019-08-14 16:30:01 +08:00
parent c4b89ae9c9
commit 9c4580410f
1 changed files with 2 additions and 0 deletions

View File

@ -40,6 +40,8 @@ class PersonalConferencesController < ApplicationController
writing_conferences_show = writing_conferences_temp.select {|value| value.send("publication_date").strftime("%Y/%m").collect{|x| x.title}.join(', ').include? params[:keywords]}
when "author_type"
writing_conferences_show = writing_conferences_temp.select {|value| value.conference_author_types.collect{|cat| cat.title}.join(", ").include? params[:keywords]}
when "language"
writing_conferences_show = writing_conferences_temp.select {|value| (!value.language.nil? ? t("#{value.language}") : "").include? params[:keywords]}
else
writing_conferences_show = writing_conferences_temp.select {|value| value.send(params[:selectbox]).to_s.include? params[:keywords]}
end