Class: Decidim::Votings::PollingStation
- Inherits:
-
ApplicationRecord
- Object
- ApplicationRecord
- Decidim::Votings::PollingStation
- Includes:
- FilterableResource, 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.
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.log_presenter_class_for(_log) ⇒ Object
65 66 67 |
# File 'app/models/decidim/votings/polling_station.rb', line 65 def self.log_presenter_class_for(_log) Decidim::Votings::AdminLog::PollingStationPresenter end |
Instance Method Details
#closure_for(election) ⇒ Object
61 62 63 |
# File 'app/models/decidim/votings/polling_station.rb', line 61 def closure_for(election) closures.find_by(election:) end |
#missing_officers? ⇒ Boolean
53 54 55 |
# File 'app/models/decidim/votings/polling_station.rb', line 53 def missing_officers? polling_station_president.nil? || polling_station_managers.empty? end |
#slug ⇒ Object
57 58 59 |
# File 'app/models/decidim/votings/polling_station.rb', line 57 def slug "polling_station_#{id}" end |