Sha256: 7e0d99c2d0200edff2e2c5709a8b20abd10402286f9975569f019b2ce677ec3a

Contents?: true

Size: 633 Bytes

Versions: 38

Compression:

Stored size: 633 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Elections
    module Voter
      # This class holds the data to verify a vote.
      class VerifyVoteForm < Decidim::Form
        attribute :vote_identifier, String

        validates :vote_identifier, :election, presence: true

        delegate :id, to: :election, prefix: true

        # Public: returns the associated election for the vote.
        def election
          @election ||= context.election
        end

        def bulletin_board
          @bulletin_board ||= context[:bulletin_board] || Decidim::Elections.bulletin_board
        end
      end
    end
  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
decidim-elections-0.27.1 app/forms/decidim/elections/voter/verify_vote_form.rb
decidim-elections-0.26.4 app/forms/decidim/elections/voter/verify_vote_form.rb
decidim-elections-0.27.0 app/forms/decidim/elections/voter/verify_vote_form.rb
decidim-elections-0.26.3 app/forms/decidim/elections/voter/verify_vote_form.rb
decidim-elections-0.27.0.rc2 app/forms/decidim/elections/voter/verify_vote_form.rb
decidim-elections-0.27.0.rc1 app/forms/decidim/elections/voter/verify_vote_form.rb
decidim-elections-0.26.2 app/forms/decidim/elections/voter/verify_vote_form.rb
decidim-elections-0.26.1 app/forms/decidim/elections/voter/verify_vote_form.rb
decidim-elections-0.26.0 app/forms/decidim/elections/voter/verify_vote_form.rb
decidim-elections-0.26.0.rc2 app/forms/decidim/elections/voter/verify_vote_form.rb
decidim-elections-0.26.0.rc1 app/forms/decidim/elections/voter/verify_vote_form.rb
decidim-elections-0.25.2 app/forms/decidim/elections/voter/verify_vote_form.rb
decidim-elections-0.25.1 app/forms/decidim/elections/voter/verify_vote_form.rb
decidim-elections-0.25.0 app/forms/decidim/elections/voter/verify_vote_form.rb
decidim-elections-0.25.0.rc4 app/forms/decidim/elections/voter/verify_vote_form.rb
decidim-elections-0.25.0.rc3 app/forms/decidim/elections/voter/verify_vote_form.rb
decidim-elections-0.25.0.rc2 app/forms/decidim/elections/voter/verify_vote_form.rb
decidim-elections-0.25.0.rc1 app/forms/decidim/elections/voter/verify_vote_form.rb