osem-fcy/app/models/survey_question.rb

11 lines
382 B
Ruby
Raw Normal View History

2016-06-28 18:16:06 +03:00
class SurveyQuestion < ActiveRecord::Base
belongs_to :survey
# Order of this list should not be changed without proper action!
enum type: [:boolean, :choice, :string, :text, :datetime, :numeric]
ICONS = { boolean: 'dot-circle-o', choice: 'check-square-o', string: 'edit', text: 'align-left', datetime: 'clock-o', numeric: 'slack' }
validates :title, presence: true
end