# -*- 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, :dependent => :destroy
  
  accepts_nested_attributes_for :answer_sets


  
  scope :dont_answered, -> {
    
    includes(:answer_sets).where("answer_sets.is_checked == ?", false)
  }
  
end
