blob: a94ad778783823120fe7442df36d9342bb74a0a5 (
plain)
1
2
3
4
5
6
7
8
9
|
class ScoringCriterium < ApplicationRecord
has_many :scores, dependent: :destroy
validates :name, :category, presence: true
def self.grouped_by_category
ScoringCriterium.all.group_by(&:category)
end
end
|