chore: ensure likert score ranges from 1 to 5

This commit is contained in:
Nelson Jovel 2024-01-05 09:17:01 -08:00
parent 9f6e8a5933
commit 3093d9236a

View file

@ -14,6 +14,8 @@ module Dashboard
has_one :dashboard_measure, through: :dashboard_survey_item has_one :dashboard_measure, through: :dashboard_survey_item
validates :likert_score, numericality: { greater_than: 0, less_than_or_equal_to: 5 }
scope :exclude_boston, lambda { scope :exclude_boston, lambda {
includes(school: :district).where.not("district.name": "Boston") includes(school: :district).where.not("district.name": "Boston")
} }