mirror of
https://github.com/edcommonwealth/Dashboard.git
synced 2026-03-16 09:45:53 -07:00
chore: seed framework
This commit is contained in:
parent
cd7b05df73
commit
27550e0b30
10 changed files with 83 additions and 82 deletions
|
|
@ -1,9 +1,9 @@
|
|||
module Dashboard
|
||||
class Scale < ApplicationRecord
|
||||
belongs_to :dashboard_measure
|
||||
has_many :dashboard_survey_items
|
||||
has_many :dashboard_survey_item_responses, through: :dashboard_survey_items
|
||||
has_many :dashboard_admin_data_items
|
||||
belongs_to :measure, class_name: "Measure", foreign_key: :dashboard_measure_id
|
||||
has_many :survey_items
|
||||
has_many :survey_item_responses, through: :survey_items
|
||||
has_many :admin_data_items, class_name: "AdminDataItem", foreign_key: :admin_data_item_id
|
||||
|
||||
def score(school:, academic_year:)
|
||||
@score ||= Hash.new do |memo, (school, academic_year)|
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue