pic_vert_app/app/models/question_set.rb
Nicolas Bally 2967c3a782 suite
2021-05-15 11:07:21 +02:00

14 lines
396 B
Ruby

# -*- encoding : utf-8 -*-
class QuestionSet < ActiveRecord::Base
belongs_to :survey_item
belongs_to :survey_set
#attr_accessible :answer_sets_attributes, :survey_item, :survey_item_id, :boolean_content, :content
has_many :answer_sets
accepts_nested_attributes_for :answer_sets
scope :dont_answered, -> includes(:answer_sets).where("answer_sets.is_checked == ?", false)
end