diff --git a/app/models/school_question.rb b/app/models/school_question.rb index 03c0f46e..91136ead 100644 --- a/app/models/school_question.rb +++ b/app/models/school_question.rb @@ -9,6 +9,7 @@ class SchoolQuestion < ApplicationRecord validates_associated :school_category scope :for, -> (school, question) { where(school_id: school.id, question_id: question.id) } + scope :in, -> (year) { where(year: year) } def sync_attempts attempt_data = Attempt.