Sha256: 5aeb9cfd7fe70733e0484a1c88c05404496296976f0c72124c216ba61f111a0c
Contents?: true
Size: 584 Bytes
Versions: 38
Compression:
Stored size: 584 Bytes
Contents
# frozen_string_literal: true module Decidim module Votings class QuestionResultForm < Decidim::Form include TranslatableAttributes attribute :id, Integer translatable_attribute :title, String attribute :nota_option, Boolean attribute :value, Integer validates :id, :value, presence: true validates :value, numericality: true def map_model(model) question = model[:question] self.id = question.id self.title = question.title self.nota_option = question.nota_option? end end end end
Version data entries
38 entries across 38 versions & 1 rubygems