dirty commit: can't get references to work correctly between any tables

This commit is contained in:
Nelson Jovel 2024-01-04 19:36:10 -08:00
parent e1f0b78236
commit a4fddbeced
183 changed files with 5461 additions and 5 deletions

View file

@ -0,0 +1,13 @@
module Dashboard
class Category < ApplicationRecord
include FriendlyId
friendly_id :name, use: [:slugged]
scope :sorted, -> { order(:category_id) }
has_many :subcategories
has_many :measures, through: :subcategories
has_many :admin_data_items, through: :measures
has_many :scales, through: :subcategories
end
end