mirror of
https://github.com/edcommonwealth/Dashboard.git
synced 2026-03-09 07:18:13 -07:00
dirty commit: can't get references to work correctly between any tables
This commit is contained in:
parent
e1f0b78236
commit
a4fddbeced
183 changed files with 5461 additions and 5 deletions
14
app/models/dashboard/admin_data_item.rb
Normal file
14
app/models/dashboard/admin_data_item.rb
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
module Dashboard
|
||||
class AdminDataItem < ApplicationRecord
|
||||
belongs_to :dashboard_scale
|
||||
has_many :dashboard_admin_data_values
|
||||
|
||||
scope :for_measures, lambda { |measures|
|
||||
joins(:scale).where('scale.measure': measures)
|
||||
}
|
||||
|
||||
scope :non_hs_items_for_measures, lambda { |measure|
|
||||
for_measures(measure).where(hs_only_item: false)
|
||||
}
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue