diff --git a/app/components/budgets/ballot/ballot_component.html.erb b/app/components/budgets/ballot/ballot_component.html.erb
index cdd1f0641..132431c74 100644
--- a/app/components/budgets/ballot/ballot_component.html.erb
+++ b/app/components/budgets/ballot/ballot_component.html.erb
@@ -15,7 +15,6 @@
- <% ballot_groups = ballot.groups.sort_by_name %>
<% ballot_groups.each do |group| %>
<% heading = ballot.heading_for_group(group) %>
@@ -46,7 +45,6 @@
<% end %>
- <% no_balloted_groups = budget.groups.sort_by_name - ballot_groups %>
<% no_balloted_groups.each do |group| %>
diff --git a/app/components/budgets/ballot/ballot_component.rb b/app/components/budgets/ballot/ballot_component.rb
index 7e2b77aaf..3eb6e78e4 100644
--- a/app/components/budgets/ballot/ballot_component.rb
+++ b/app/components/budgets/ballot/ballot_component.rb
@@ -8,4 +8,14 @@ class Budgets::Ballot::BallotComponent < ApplicationComponent
def budget
ballot.budget
end
+
+ private
+
+ def ballot_groups
+ ballot.groups.sort_by_name
+ end
+
+ def no_balloted_groups
+ budget.groups.sort_by_name - ballot.groups
+ end
end