pic_vert_app/app/models/survey_item.rb
2012-08-18 12:07:32 +02:00

15 lines
498 B
Ruby

class SurveyItem < ActiveRecord::Base
belongs_to :survey_type
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"]
DISPLAY_TYPES = ["inline", "grid", "dropdown"]
has_many :answers, :class_name => "SurveyItemAnswer", :dependent => :destroy
has_many :question_sets
end