pic_vert_app/app/models/question_set.rb
Nicolas Bally d244220d03 suite
2021-05-15 11:09:05 +02:00

14 lines
400 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