批量添加学生

This commit is contained in:
cxt 2016-08-26 19:50:47 +08:00
parent 5dab473eb1
commit 885cc820a8
1 changed files with 1 additions and 1 deletions

View File

@ -229,7 +229,7 @@ class MembersController < ApplicationController
user_ids.each do |user_id|
member = Member.new(:role_ids => params[:membership][:role_ids], :user_id => user_id)
role_ids = attrs.delete(:role_ids)
role_ids = params[:membership][:role_ids]
#role = Role.find(params[:membership][:role_ids])
# 这里的判断只能通过角色名,可以弄成常量
if role_ids && role_ids.include?("10")