|
|
|
@ -168,7 +168,7 @@ module ApplicationHelper
|
|
|
|
|
|
|
|
|
|
# 选用实训的学校情况
|
|
|
|
|
def school_user_detail shixun
|
|
|
|
|
user_ids = shixun.myshixuns.select{|myshixun| myshixun.user_id}.uniq # 走缓存取数据
|
|
|
|
|
user_ids = shixun.myshixuns.map(&:user_id).uniq # 走缓存取数据
|
|
|
|
|
school_ids = UserExtension.where(user_id:user_ids).pluck(:school_id).uniq
|
|
|
|
|
school_names = School.where(id: school_ids[0..1]).pluck(:name)
|
|
|
|
|
school_size = school_ids.size
|
|
|
|
|