Class: Decidim::Votings::BallotResultForm
- Inherits:
-
Form
- Object
- Form
- Decidim::Votings::BallotResultForm
- Defined in:
- app/forms/decidim/votings/ballot_result_form.rb
Instance Method Summary collapse
Instance Method Details
#ballot_total_count ⇒ Object
19 20 21 |
# File 'app/forms/decidim/votings/ballot_result_form.rb', line 19 def ballot_total_count total_ballots_count == (valid_ballots_count.to_i + blank_ballots_count.to_i + null_ballots_count.to_i) end |
#map_model(model) ⇒ Object
23 24 25 |
# File 'app/forms/decidim/votings/ballot_result_form.rb', line 23 def map_model(model) self.total_ballots_count = model.results&.total_ballots&.first&.value || 0 end |