|
|
@ -11,7 +11,8 @@ class CompetitionTeam < ActiveRecord::Base
|
|
|
|
# attr_accessible :invite_code, :name, :team_type
|
|
|
|
# attr_accessible :invite_code, :name, :team_type
|
|
|
|
|
|
|
|
|
|
|
|
def teacher
|
|
|
|
def teacher
|
|
|
|
User.where(:id => self.teacher_id).first
|
|
|
|
teacher_id = self.teachers.first&.user_id
|
|
|
|
|
|
|
|
User.find_by(id: teacher_id)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
def group_members
|
|
|
|
def group_members
|
|
|
|