Update personal_projects_controller.rb
fix language not translated
This commit is contained in:
parent
aa35cd4de6
commit
05a285a472
|
@ -28,6 +28,8 @@ class PersonalProjectsController < ApplicationController
|
|||
projects_show = projects_temp.select {|value| search_all_words(value.send("project_title").to_s, params[:keywords])}
|
||||
when "period"
|
||||
projects_show = projects_temp.select {|value| search_all_words(value.send("duration").to_s, params[:keywords])}
|
||||
when "language"
|
||||
projects_show = projects_temp.select {|value| search_all_words(t(value.send("language")), params[:keywords])}
|
||||
else
|
||||
projects_show = projects_temp.select {|value| search_all_words(value.send(params[:selectbox]).to_s, params[:keywords])}
|
||||
end
|
||||
|
@ -52,6 +54,8 @@ class PersonalProjectsController < ApplicationController
|
|||
t << {"value" => "<a href='#{OrbitHelper.url_to_show(project.to_param)}'>" + (project.send(fs) rescue "") + "</a>"}
|
||||
when "period"
|
||||
t << {"value" => (project.send("duration") rescue "")}
|
||||
when "language"
|
||||
t << {"value" => (t(project.send("language")) rescue "")}
|
||||
else
|
||||
t << {"value" => (project.send(fs) rescue "")}
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue