chore: seed framework

This commit is contained in:
Nelson Jovel 2024-01-11 17:55:01 -08:00
parent cd7b05df73
commit 27550e0b30
10 changed files with 83 additions and 82 deletions

View file

@ -1,7 +1,7 @@
module Dashboard
class AdminDataItem < ApplicationRecord
belongs_to :dashboard_scale
has_many :dashboard_admin_data_values
belongs_to :scale, class_name: "Scale", foreign_key: :dashboard_scale_id
has_many :admin_data_values, class_name: "AdminDataValue", foreign_key: :dashboard_admin_data_item_id
scope :for_measures, lambda { |measures|
joins(:scale).where('scale.measure': measures)