gravier_app/app/models/survey_item.rb
2017-09-21 12:37:53 +02:00

21 lines
620 B
Ruby

# -*- encoding : utf-8 -*-
class SurveyItem < ActiveRecord::Base
belongs_to :survey_type
belongs_to :survey_step
belongs_to :survey_group
#attr_accessible :description, :display_type, :help, :item_type, :questions_type, :string_type, :title, :archived, :locked, :text_presentation, :max_checkboxes
ITEM_TYPES = ["question", "note"]
QUESTIONS_TYPES = ["boolean", "string", "check_box", "radio", "order"]
DISPLAY_TYPES = ["inline", "grid", "dropdown"]
has_many :answers, :class_name => "SurveyItemAnswer", :dependent => :destroy
has_many :question_sets, :dependent => :destroy
end