From a5841b820fe330ea831f24589a62cf6c94a097b4 Mon Sep 17 00:00:00 2001 From: bohung Date: Thu, 15 Dec 2022 17:37:00 +0800 Subject: [PATCH] Fix link. --- app/models/honor.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/models/honor.rb b/app/models/honor.rb index dcd30e2..e2bc585 100644 --- a/app/models/honor.rb +++ b/app/models/honor.rb @@ -78,8 +78,9 @@ class Honor fields_to_show.collect do |t| if t == "award_name" link = OrbitHelper.url_to_plugin_show(p.to_param,'personal_honor') - link = (link == "#" ? p.send(t) : "#{p.send(t)}") - pd_data << { "data_title" => link } + url_to_plugin_show_blank = OrbitHelper.instance_variable_get(:@url_to_plugin_show_blank) + tmp_title = p.award_name + pd_data << { "data_title" => (url_to_plugin_show_blank ? tmp_title : "#{tmp_title}") } elsif t == "honor_type" pd_data << {"data_title" => (p.honor_type.title rescue "")} elsif t == "award_date"