fix for frontend

This commit is contained in:
Harry Bomrah 2014-10-03 14:14:59 +08:00
parent c64e8b63fd
commit 04e352e594
2 changed files with 2 additions and 2 deletions

View File

@ -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) 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| experience_list = experiences.collect do |experience|
{ {
"member" => experience.member_profile.name, "member" => (experience.member_profile.name rescue ""),
"duration" => experience.duration, "duration" => experience.duration,
"organizationt_title" => experience.organizationt_title, "organizationt_title" => experience.organizationt_title,
"department" => experience.department, "department" => experience.department,

View File

@ -40,7 +40,7 @@ class Experience
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