fix for frontend
This commit is contained in:
parent
d6c21212f5
commit
d257e273a3
|
@ -3,7 +3,7 @@ class PersonalResearchesController < ApplicationController
|
||||||
researchs = Research.where(:is_hidden=>false).order_by(:year=>'desc').page(OrbitHelper.params[:page_no]).per(OrbitHelper.page_data_count)
|
researchs = Research.where(:is_hidden=>false).order_by(:year=>'desc').page(OrbitHelper.params[:page_no]).per(OrbitHelper.page_data_count)
|
||||||
research_list = researchs.collect do |research|
|
research_list = researchs.collect do |research|
|
||||||
{
|
{
|
||||||
"member" => research.member_profile.name,
|
"member" => (research.member_profile.name rescue ""),
|
||||||
"year" => research.year,
|
"year" => research.year,
|
||||||
"publication_date" => (research.publish_date.strftime("%Y.%m") rescue ""),
|
"publication_date" => (research.publish_date.strftime("%Y.%m") rescue ""),
|
||||||
"research_title" => research.research_title,
|
"research_title" => research.research_title,
|
||||||
|
|
|
@ -31,7 +31,7 @@ class Research
|
||||||
def get_plugin_data(fields_to_show)
|
def get_plugin_data(fields_to_show)
|
||||||
plugin_datas = []
|
plugin_datas = []
|
||||||
fields_to_show.each do |field|
|
fields_to_show.each do |field|
|
||||||
plugin_data = self.get_plugin_field_data(field)
|
plugin_data = self.get_plugin_field_data(field) rescue nil
|
||||||
next if plugin_data.blank? or plugin_data['value'].blank?
|
next if plugin_data.blank? or plugin_data['value'].blank?
|
||||||
plugin_datas << plugin_data
|
plugin_datas << plugin_data
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue