From a360529e89e646d7d9b94e5a6da9607321fa4c94 Mon Sep 17 00:00:00 2001 From: chiu Date: Wed, 14 Aug 2019 10:51:01 +0800 Subject: [PATCH] Update personal_journals_controller.rb --- app/controllers/personal_journals_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/personal_journals_controller.rb b/app/controllers/personal_journals_controller.rb index 8ac6941..3271bdb 100644 --- a/app/controllers/personal_journals_controller.rb +++ b/app/controllers/personal_journals_controller.rb @@ -87,10 +87,10 @@ class PersonalJournalsController < ApplicationController end choice_value = fields_to_show choice_value.unshift("default") + choice_select=choice_value.map{|iter| iter==params[:selectbox] ? "true" : "false"} choice_value=choice_value.map{|value| {"choice_value" => value}} choice_default = params[:locale]!='en' ? "——選取分類——" : "——select class——" choice_show.unshift(choice_default) - choice_select=choice_value.map{|iter| iter==params[:selectbox] ? "true" : "false"} choice_show=choice_show.map{|value| {"choice_show" => value}} choice=choice_value.zip(choice_show,choice_select) choice=choice.map{|value| value.inject:merge}