From 04e352e594323a1ddaa97fac080d6024aa3f9fff Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Fri, 3 Oct 2014 14:14:59 +0800 Subject: [PATCH] fix for frontend --- app/controllers/personal_experiences_controller.rb | 2 +- app/models/experience.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/personal_experiences_controller.rb b/app/controllers/personal_experiences_controller.rb index 97d19c3..987054e 100644 --- a/app/controllers/personal_experiences_controller.rb +++ b/app/controllers/personal_experiences_controller.rb @@ -3,7 +3,7 @@ class PersonalExperiencesController < ApplicationController experiences = Experience.where(:is_hidden=>false).order_by(:end_date=>'desc',:start_date=>'desc').page(OrbitHelper.params[:page_no]).per(OrbitHelper.page_data_count) experience_list = experiences.collect do |experience| { - "member" => experience.member_profile.name, + "member" => (experience.member_profile.name rescue ""), "duration" => experience.duration, "organizationt_title" => experience.organizationt_title, "department" => experience.department, diff --git a/app/models/experience.rb b/app/models/experience.rb index d76a0ab..f686467 100644 --- a/app/models/experience.rb +++ b/app/models/experience.rb @@ -40,7 +40,7 @@ class Experience 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