From d832a5eecf9af73ef62f0f073835c6d41015b1f4 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 12 Jun 2014 14:43:51 +0800 Subject: [PATCH] rake db:migrate --- app/controllers/homework_attach_controller.rb | 1 + app/views/homework_attach/show.html.erb | 2 +- db/schema.rb | 12 +++++------- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/app/controllers/homework_attach_controller.rb b/app/controllers/homework_attach_controller.rb index abbb47c1c..e5f9685f0 100644 --- a/app/controllers/homework_attach_controller.rb +++ b/app/controllers/homework_attach_controller.rb @@ -156,6 +156,7 @@ class HomeworkAttachController < ApplicationController #获取可选成员列表 #homework:作业 #users:该作业所有成员 + #q:模糊匹配的用户的昵称 def members_for_homework homework,users,q homework.bid.courses.first.members.joins(:member_roles).where("member_roles.role_id IN (:role_id) and user_id not in (:users)", {:role_id => [5, 10],:users => users}).joins(:user).where("users.login like '%#{q}%'") end diff --git a/app/views/homework_attach/show.html.erb b/app/views/homework_attach/show.html.erb index 0e7adacbe..7df12032f 100644 --- a/app/views/homework_attach/show.html.erb +++ b/app/views/homework_attach/show.html.erb @@ -49,7 +49,7 @@