You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
338 B
15 lines
338 B
# frozen_string_literal: true
|
|
|
|
class AdminDataItem < ActiveRecord::Base
|
|
belongs_to :scale
|
|
has_many :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
|