From e1b52466fb6e1b7d75b1e7ac28614626956c68c0 Mon Sep 17 00:00:00 2001 From: chiu Date: Wed, 1 Apr 2020 10:28:06 +0800 Subject: [PATCH] fix type error --- app/controllers/personal_honors_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/personal_honors_controller.rb b/app/controllers/personal_honors_controller.rb index 3b3104b..23cbbe9 100644 --- a/app/controllers/personal_honors_controller.rb +++ b/app/controllers/personal_honors_controller.rb @@ -58,7 +58,7 @@ class PersonalHonorsController < ApplicationController end current_locale = I18n.locale - honor_types = HonorType.all.pluck(:title).map { |title| { 'honor_type' => title[current_locale] } } + honor_types = HonorType.all.pluck(:title).map { |title| { 'honor_type' => title.to_h[current_locale] } } honor_types.unshift({ 'honor_type' => t("personal_honor.honor_types_all") }) {