@ -30,7 +30,9 @@ class SubjectsController < ApplicationController
ifsearch
subjects=subjects.where("subjects.name like ?","%#{search}%")
end
@subjects=subjects.group("subjects.id").order("myshixun_member_count DESC").select("subjects.*, sum(shixuns.myshixuns_count) AS myshixun_member_count")