Class: Decidim::Votings::EnvelopesResultForm

Inherits:
Form
  • Object
show all
Defined in:
decidim-elections/app/forms/decidim/votings/envelopes_result_form.rb

Instance Method Summary collapse

Instance Method Details

#electionObject


25
26
27
# File 'decidim-elections/app/forms/decidim/votings/envelopes_result_form.rb', line 25

def election
  @election ||= Decidim::Elections::Election.find_by(id: election_id)
end

#polling_stationObject


29
30
31
# File 'decidim-elections/app/forms/decidim/votings/envelopes_result_form.rb', line 29

def polling_station
  @polling_station ||= Decidim::Votings::PollingStation.find_by(id: polling_station_id)
end

#totals_differ?Boolean

Returns:

  • (Boolean)

19
20
21
22
23
# File 'decidim-elections/app/forms/decidim/votings/envelopes_result_form.rb', line 19

def totals_differ?
  return unless total_ballots_count

  total_ballots_count != election_votes_count
end