From 798fc2597847243b20d78abd8300df92d172e467 Mon Sep 17 00:00:00 2001 From: Eric Tsai Date: Mon, 30 Dec 2019 11:40:52 +0800 Subject: [PATCH] add link to award winner --- app/controllers/personal_honors_controller.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/controllers/personal_honors_controller.rb b/app/controllers/personal_honors_controller.rb index da7e199..608ac8a 100644 --- a/app/controllers/personal_honors_controller.rb +++ b/app/controllers/personal_honors_controller.rb @@ -33,7 +33,10 @@ class PersonalHonorsController < ApplicationController when "honor_type" t << {"value" => (honor.send("honor_type").title rescue "")} when "authors" - t << {"value" => (honor.send(:member_profile).name rescue "")} + member_profile = honor.send(:member_profile) + role_status_id = member_profile.role_status_ids.first.to_s + link = OrbitHelper.member_url_to_show(member_profile.to_param, role_status_id) rescue '#' + t << {"value" => "" + (member_profile.name rescue "") + "" } when "award_date" t << {"value" => (honor.send(fs).strftime("%Y/%m") rescue "")} else