module Admin::PersonalHonorsHelper def get_paper_list user = current_user.nil? ? OrbitHelper.current_user : current_user user_profile = user.member_profile honors = Honor.where(:member_profile_id => user_profile.id) honors = honors.collect do |h| { "id" => h.id.to_s, "edit_url" => "/#{I18n.locale.to_s}/admin/members/#{user_profile.to_param}/honors/#{h.to_param}/edit", "delete_url" => "/#{I18n.locale.to_s}/admin/honors/#{h.id.to_s}", "paper_title" => h.award_name, "keywords" => h.keywords, "files" => [] } end honors end end