fix for something

This commit is contained in:
Harry Bomrah 2014-10-28 14:56:39 +08:00
parent 90f2686f72
commit fa2736b6f6
1 changed files with 2 additions and 2 deletions

View File

@ -52,8 +52,8 @@ class UpgradeController < ApplicationController
} }
end end
text = {"en" => "", "zh_tw" => ""} text = {"en" => "", "zh_tw" => ""}
text["en"] = smart_convertor(b.text_translations["en"]) if !b.text_translations["en"].nil? text["en"] = (b.text_translations["en"].nil? ? "" :smart_convertor(b.text_translations["en"]))
text["zh_tw"] = smart_convertor(b.text_translations["zh_tw"]) if !b.text_translations["en"].nil? text["zh_tw"] = (b.text_translations["zh_tw"].nil? ? "" : smart_convertor(b.text_translations["zh_tw"]))
{ {
"id" => b.id.to_s, "id" => b.id.to_s,