From 8239dd9ef86329887b00c13b536791f795f7ef86 Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Fri, 3 Oct 2014 14:14:27 +0800 Subject: [PATCH] fix for frontend --- app/controllers/personal_conferences_controller.rb | 3 ++- app/models/writing_conference.rb | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controllers/personal_conferences_controller.rb b/app/controllers/personal_conferences_controller.rb index 56f7af4..f3fe739 100644 --- a/app/controllers/personal_conferences_controller.rb +++ b/app/controllers/personal_conferences_controller.rb @@ -1,11 +1,12 @@ class PersonalConferencesController < ApplicationController def index writing_conferences = WritingConference.where(:is_hidden=>false).order_by(:year=>'desc').page(OrbitHelper.params[:page_no]).per(OrbitHelper.page_data_count) + writing_conference_list = writing_conferences.collect do |writing_conference| { "year" => writing_conference.year, "paper_title" => writing_conference.create_link, - "author" => writing_conference.member_profile.name, + "author" => (writing_conference.member_profile.name rescue ""), "link_to_show" => OrbitHelper.url_to_show(writing_conference.to_param) } end diff --git a/app/models/writing_conference.rb b/app/models/writing_conference.rb index 8884881..3c1d0da 100644 --- a/app/models/writing_conference.rb +++ b/app/models/writing_conference.rb @@ -59,7 +59,7 @@ class WritingConference def get_plugin_data(fields_to_show) plugin_datas = [] 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? plugin_datas << plugin_data end