Sha256: f7d9abf3a964c91582649bf9ec9a2057580f9fbfde894c27fb0d804fc4767722

Contents?: true

Size: 363 Bytes

Versions: 19

Compression:

Stored size: 363 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Votings
    module Admin
      # A form to create/edit a ballot style
      class BallotStyleForm < Form
        attribute :code, String
        attribute :question_ids, Array[Integer]

        validates :code, presence: true

        def code
          super&.upcase
        end
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
decidim-elections-0.28.4 app/forms/decidim/votings/admin/ballot_style_form.rb
decidim-elections-0.27.9 app/forms/decidim/votings/admin/ballot_style_form.rb
decidim-elections-0.28.3 app/forms/decidim/votings/admin/ballot_style_form.rb
decidim-elections-0.27.8 app/forms/decidim/votings/admin/ballot_style_form.rb
decidim-elections-0.28.2 app/forms/decidim/votings/admin/ballot_style_form.rb
decidim-elections-0.27.7 app/forms/decidim/votings/admin/ballot_style_form.rb
decidim-elections-0.28.1 app/forms/decidim/votings/admin/ballot_style_form.rb
decidim-elections-0.27.6 app/forms/decidim/votings/admin/ballot_style_form.rb
decidim-elections-0.28.0 app/forms/decidim/votings/admin/ballot_style_form.rb
decidim-elections-0.27.5 app/forms/decidim/votings/admin/ballot_style_form.rb
decidim-elections-0.28.0.rc5 app/forms/decidim/votings/admin/ballot_style_form.rb
decidim-elections-0.28.0.rc4 app/forms/decidim/votings/admin/ballot_style_form.rb
decidim-elections-0.27.4 app/forms/decidim/votings/admin/ballot_style_form.rb
decidim-elections-0.27.3 app/forms/decidim/votings/admin/ballot_style_form.rb
decidim-elections-0.27.2 app/forms/decidim/votings/admin/ballot_style_form.rb
decidim-elections-0.27.1 app/forms/decidim/votings/admin/ballot_style_form.rb
decidim-elections-0.27.0 app/forms/decidim/votings/admin/ballot_style_form.rb
decidim-elections-0.27.0.rc2 app/forms/decidim/votings/admin/ballot_style_form.rb
decidim-elections-0.27.0.rc1 app/forms/decidim/votings/admin/ballot_style_form.rb