Sha256: a7468796216155383787db6de00e742b10acd8c6b41d6f8aad531ea1b0e0f0f7

Contents?: true

Size: 844 Bytes

Versions: 38

Compression:

Stored size: 844 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Votings
    # The data store for in person Votes in the Decidim::Votings space.
    class InPersonVote < ApplicationRecord
      enum status: [:pending, :accepted, :rejected]

      belongs_to :election, foreign_key: "decidim_elections_election_id", class_name: "Decidim::Elections::Election"
      belongs_to :user, foreign_key: "decidim_user_id", class_name: "Decidim::User", optional: true

      belongs_to :polling_station,
                 foreign_key: "decidim_votings_polling_station_id",
                 class_name: "Decidim::Votings::PollingStation"
      belongs_to :polling_officer,
                 foreign_key: "decidim_votings_polling_officer_id",
                 class_name: "Decidim::Votings::PollingOfficer"

      validates :voter_id, presence: true
    end
  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
decidim-elections-0.28.4 app/models/decidim/votings/in_person_vote.rb
decidim-elections-0.27.9 app/models/decidim/votings/in_person_vote.rb
decidim-elections-0.28.3 app/models/decidim/votings/in_person_vote.rb
decidim-elections-0.27.8 app/models/decidim/votings/in_person_vote.rb
decidim-elections-0.28.2 app/models/decidim/votings/in_person_vote.rb
decidim-elections-0.27.7 app/models/decidim/votings/in_person_vote.rb
decidim-elections-0.28.1 app/models/decidim/votings/in_person_vote.rb
decidim-elections-0.27.6 app/models/decidim/votings/in_person_vote.rb
decidim-elections-0.26.10 app/models/decidim/votings/in_person_vote.rb
decidim-elections-0.26.9 app/models/decidim/votings/in_person_vote.rb
decidim-elections-0.28.0 app/models/decidim/votings/in_person_vote.rb
decidim-elections-0.27.5 app/models/decidim/votings/in_person_vote.rb
decidim-elections-0.28.0.rc5 app/models/decidim/votings/in_person_vote.rb
decidim-elections-0.28.0.rc4 app/models/decidim/votings/in_person_vote.rb
decidim-elections-0.26.8 app/models/decidim/votings/in_person_vote.rb
decidim-elections-0.27.4 app/models/decidim/votings/in_person_vote.rb
decidim-elections-0.27.3 app/models/decidim/votings/in_person_vote.rb
decidim-elections-0.26.7 app/models/decidim/votings/in_person_vote.rb
decidim-elections-0.26.5 app/models/decidim/votings/in_person_vote.rb
decidim-elections-0.27.2 app/models/decidim/votings/in_person_vote.rb