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
351 B
15 lines
351 B
class Measure < ActiveRecord::Base
|
|
belongs_to :subcategory
|
|
has_many :survey_items
|
|
|
|
has_many :survey_item_responses, through: :survey_items
|
|
|
|
def includes_teacher_survey_items?
|
|
survey_items.where("survey_item_id LIKE 't-%'").any?
|
|
end
|
|
|
|
def includes_student_survey_items?
|
|
survey_items.where("survey_item_id LIKE 's-%'").any?
|
|
end
|
|
end
|