fix if awarding_unit is empty

This commit is contained in:
JiangRu 2015-04-14 18:53:44 +08:00
parent 3a61eab435
commit b09132c925
1 changed files with 1 additions and 1 deletions

View File

@ -5,7 +5,7 @@ class PersonalHonorsController < ApplicationController
{ {
"year" => honor.year, "year" => honor.year,
"award_name" => honor.award_name, "award_name" => honor.award_name,
"awarding_unit" => honor.awarding_unit, "awarding_unit" => (honor.awarding_unit rescue ""),
"award_winner" => (honor.member_profile.name rescue ""), "award_winner" => (honor.member_profile.name rescue ""),
"link_to_show" => OrbitHelper.url_to_show(honor.to_param) "link_to_show" => OrbitHelper.url_to_show(honor.to_param)
} }