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

dev_hjq
cxt 10 years ago
parent e889f798d7
commit 5c1ff1f6f7

@ -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

Loading…
Cancel
Save