From 2b7f8da7e49898269556388941fdacfc0d4732e4 Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Wed, 6 Apr 2016 15:37:17 +0800 Subject: [PATCH] fixed yes and no --- app/models/technology_transfer.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/models/technology_transfer.rb b/app/models/technology_transfer.rb index c5e0961..066fd2a 100644 --- a/app/models/technology_transfer.rb +++ b/app/models/technology_transfer.rb @@ -94,9 +94,11 @@ class TechnologyTransfer def get_plugin_field_data(field) case field when "technology_transfer_category" - value = self.technology_transfer_category.title rescue "" + value = self.technology_transfer_category.title rescue "" + when "patent_granted" + value = self.patent_granted ? I18n.t("personal_technology_transfer.y_es") : I18n.t("personal_technology_transfer.n_o") else - value = self.send(field) rescue "" + value = self.send(field) rescue "" end value = (value =~ /\A#{URI::regexp(['http', 'https'])}\z/) ? "#{value}" : value