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.28.4 app/forms/decidim/elections/voter/verify_vote_form.rb
decidim-elections-0.27.9 app/forms/decidim/elections/voter/verify_vote_form.rb
decidim-elections-0.28.3 app/forms/decidim/elections/voter/verify_vote_form.rb
decidim-elections-0.27.8 app/forms/decidim/elections/voter/verify_vote_form.rb
decidim-elections-0.28.2 app/forms/decidim/elections/voter/verify_vote_form.rb
decidim-elections-0.27.7 app/forms/decidim/elections/voter/verify_vote_form.rb
decidim-elections-0.28.1 app/forms/decidim/elections/voter/verify_vote_form.rb
decidim-elections-0.27.6 app/forms/decidim/elections/voter/verify_vote_form.rb
decidim-elections-0.26.10 app/forms/decidim/elections/voter/verify_vote_form.rb
decidim-elections-0.26.9 app/forms/decidim/elections/voter/verify_vote_form.rb
decidim-elections-0.28.0 app/forms/decidim/elections/voter/verify_vote_form.rb
decidim-elections-0.27.5 app/forms/decidim/elections/voter/verify_vote_form.rb
decidim-elections-0.28.0.rc5 app/forms/decidim/elections/voter/verify_vote_form.rb
decidim-elections-0.28.0.rc4 app/forms/decidim/elections/voter/verify_vote_form.rb
decidim-elections-0.26.8 app/forms/decidim/elections/voter/verify_vote_form.rb
decidim-elections-0.27.4 app/forms/decidim/elections/voter/verify_vote_form.rb
decidim-elections-0.27.3 app/forms/decidim/elections/voter/verify_vote_form.rb
decidim-elections-0.26.7 app/forms/decidim/elections/voter/verify_vote_form.rb
decidim-elections-0.26.5 app/forms/decidim/elections/voter/verify_vote_form.rb
decidim-elections-0.27.2 app/forms/decidim/elections/voter/verify_vote_form.rb