You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
educoder/app/models/team_member.rb

8 lines
231 B

class TeamMember < ApplicationRecord
belongs_to :user
belongs_to :competition
belongs_to :competition_team
scope :only_teachers, -> { where(is_teacher: true) }
scope :without_teachers, -> { where(is_teacher: false) }
end