forked from saurabh/personal-project
Update personal_projects_controller.rb
This commit is contained in:
parent
96af616d2d
commit
aa35cd4de6
|
@ -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] }
|
projects_temp = Project.where(:is_hidden=>false).sort_by{ |tp| [-tp[:year].to_i,-tp[:publication_date].to_i] }
|
||||||
case params[:selectbox]
|
case params[:selectbox]
|
||||||
when "project_type"
|
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"
|
when "project_title","default"
|
||||||
projects_show = projects_temp.select {|value| search_all_words(value.send("project_title").to_s, params[:keywords])}
|
projects_show = projects_temp.select {|value| search_all_words(value.send("project_title").to_s, params[:keywords])}
|
||||||
when "period"
|
when "period"
|
||||||
|
|
Loading…
Reference in New Issue