This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
#encoding: utf-8
classCompetitionTeam<ActiveRecord::Base
belongs_to:user
belongs_to:competition
has_many:team_members,:dependent=>:destroy
has_many:competition_scores,:dependent=>:destroy
# team_type 0:组队 1:个人
# attr_accessible :invite_code, :name, :team_type
defteacher
User.where(:id=>self.teacher_id).first
end
defgroup_members
str=""
self.team_members.where(:is_teacher=>0).joins("join users on team_members.user_id = users.id").order("CONVERT(lastname USING gbk) COLLATE gbk_chinese_ci asc").eachdo|member|