Class: Decidim::Votings::PollingStation

Inherits:
ApplicationRecord
  • Object
show all
Includes:
TranslatableResource, Loggable, Traceable
Defined in:
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 '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 '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 'app/models/decidim/votings/polling_station.rb', line 56

def slug
  "polling_station_#{id}"
end