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