From bcb21d2126d4ce8f0dc79622500050c6984ad17c Mon Sep 17 00:00:00 2001 From: manson Date: Thu, 3 Jul 2014 19:31:30 +0800 Subject: [PATCH] Fix hidden status --- app/controllers/personal_diplomas_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/personal_diplomas_controller.rb b/app/controllers/personal_diplomas_controller.rb index 97544f0..8d9d337 100644 --- a/app/controllers/personal_diplomas_controller.rb +++ b/app/controllers/personal_diplomas_controller.rb @@ -1,6 +1,6 @@ class PersonalDiplomasController < ApplicationController def index - diplomas = Diploma.all + diplomas = Diploma.where(:is_hidden=>false).all diploma_list = diplomas.collect do |diploma| { "member" => diploma.member_profile.name, @@ -25,7 +25,7 @@ class PersonalDiplomasController < ApplicationController def show params = OrbitHelper.params - diploma = Diploma.find_by(uid: params[:uid]) + diploma = Diploma.where(:is_hidden=>false).find_by(uid: params[:uid]) { "school_name" => diploma.school_name,