Sha256: 9f55222389bc866f2d8e8cfc1600ad99e0f13df5f7bf979dbc0f7cd170f0bf77
Contents?: true
Size: 766 Bytes
Versions: 30
Compression:
Stored size: 766 Bytes
Contents
# frozen_string_literal: true module Decidim module Surveys module Admin # This class holds a Form to update survey questions from Decidim's admin panel. class SurveyQuestionForm < Decidim::Form include TranslatableAttributes attribute :id, String attribute :position, Integer attribute :mandatory, Boolean, default: false attribute :question_type, String attribute :answer_options, Array[SurveyQuestionAnswerOptionForm] attribute :deleted, Boolean, default: false translatable_attribute :body, String validates :position, numericality: { greater_than_or_equal_to: 0 } validates :question_type, inclusion: { in: SurveyQuestion::TYPES } end end end end
Version data entries
30 entries across 30 versions & 2 rubygems