关联项目时不显示已删除的项目

This commit is contained in:
cxt 2016-01-13 18:42:25 +08:00
parent e889f798d7
commit 5c1ff1f6f7
1 changed files with 1 additions and 1 deletions

View File

@ -683,7 +683,7 @@ class StudentWorkController < ApplicationController
if !params[:name].nil?
condition = "%#{params[:name].strip}%".gsub(" ","")
end
@project_ids = Project.where("user_id = #{User.current.id} and name like '#{condition}'")
@project_ids = Project.visible.where("user_id = #{User.current.id} and name like '#{condition}'")
@first = params[:first].to_i
respond_to do |format|
format.js