pic_vert_app/app/models/question_set.rb
2013-07-18 11:17:41 +02:00

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