From 7d3ebbf54b9a6410714ae8689421b8f4eea5fb5c Mon Sep 17 00:00:00 2001 From: bohung Date: Fri, 27 Nov 2020 14:56:47 +0800 Subject: [PATCH] Fix bug. --- app/models/research.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/models/research.rb b/app/models/research.rb index 46b083a..1d7b7e3 100644 --- a/app/models/research.rb +++ b/app/models/research.rb @@ -74,7 +74,7 @@ class Research pd_data = [] fields_to_show.collect do |t| if t == "research_title" - pd_data << { "data_title" => "#{p.send(t)}" } + pd_data << { "data_title" => "#{p.send(t)}" } elsif t == "research_category" pd_data << {"data_title" => (p.research_category.title rescue "")} else @@ -107,17 +107,17 @@ class Research self.research_files.each do |research_file| url = research_file.file.url title = (research_file.title.blank? ? File.basename(research_file.file.path) : research_file.title) - files << "
  • #{title}
  • " + files << "
  • #{title}
  • " end value = files.join("") when "authors" path = OrbitHelper.url_to_plugin_show(self.member_profile.to_param, 'member') rescue '#' - value = "#{self.member_profile.name}" + value = "#{self.member_profile.name}" else value = self.send(field) rescue "" end - value = (value =~ /\A#{URI::regexp(['http', 'https'])}\z/) ? "#{value}" : value + value = (value =~ /\A#{URI::regexp(['http', 'https'])}\z/) ? "#{value}" : value { "key"=>field,