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.
sqm-dashboards/app/models/survey_item_response.rb

14 lines
407 B

class SurveyItemResponse < ActiveRecord::Base
TEACHER_RESPONSE_THRESHOLD = 2
STUDENT_RESPONSE_THRESHOLD = 2
belongs_to :academic_year
belongs_to :school
belongs_to :survey_item
scope :exclude_boston, lambda {
boston = District.where(name: 'Boston').first
where.not(school: boston.schools) if boston.present?
}
end