From b120e0fde55aa2b17568f13573f4a1f14abaf935 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Fri, 18 Oct 2019 14:09:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/competition_team.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/competition_team.rb b/app/models/competition_team.rb index a8f48b3e..a7d89546 100644 --- a/app/models/competition_team.rb +++ b/app/models/competition_team.rb @@ -5,7 +5,7 @@ class CompetitionTeam < ActiveRecord::Base has_many :team_members, :dependent => :destroy has_many :members, conditions: 'team_members.is_teacher = 0', class_name: 'TeamMember' - has_many :teachers, conditions: 'team_members.is_teacher = 1', class_name: 'TeamMember' + has_many :teachers, conditions: 'team_members.is_teacher = 1', class_name: 'TeamMember', :order => "team_members.role ASC" has_many :competition_scores, :dependent => :destroy # team_type 0:组队 1:个人 # attr_accessible :invite_code, :name, :team_type