Class: Decidim::Votings::PollingStation

Inherits:
ApplicationRecord show all
Includes:
Loggable, Traceable, TranslatableResource
Defined in:
decidim-elections/app/models/decidim/votings/polling_station.rb

Overview

The data store for a PollingStation in the Votings::Voting partecipatory space.

Instance Method Summary collapse

Instance Method Details

#closure_for(election) ⇒ Object


60
61
62
# File 'decidim-elections/app/models/decidim/votings/polling_station.rb', line 60

def closure_for(election)
  closures.find_by(election: election)
end

#missing_officers?Boolean

Returns:

  • (Boolean)

52
53
54
# File 'decidim-elections/app/models/decidim/votings/polling_station.rb', line 52

def missing_officers?
  polling_station_president.nil? || polling_station_managers.empty?
end

#slugObject


56
57
58
# File 'decidim-elections/app/models/decidim/votings/polling_station.rb', line 56

def slug
  "polling_station_#{id}"
end