Don't re-render the ballot twice

We were rendering an individual ballot, and then rendering all ballots
(including the already rendered one). So we can skip the first part, as
pointed out by microweb10 in the comments of pull request 3036.
This commit is contained in:
Javi Martín
2020-07-28 20:25:48 +02:00
parent 160964fcdc
commit ceee25fdc9
2 changed files with 0 additions and 8 deletions

View File

@@ -1,9 +1,5 @@
$("#progress_bar").html("<%= j render("/budgets/ballot/progress_bar", ballot: @ballot) %>"); $("#progress_bar").html("<%= j render("/budgets/ballot/progress_bar", ballot: @ballot) %>");
$("#sidebar").html("<%= j render("/budgets/investments/sidebar") %>"); $("#sidebar").html("<%= j render("/budgets/investments/sidebar") %>");
$("#<%= dom_id(@investment) %>_ballot").html("<%= j render("/budgets/investments/ballot",
investment: @investment,
investment_ids: @investment_ids,
ballot: @ballot) %>");
<%= render "refresh_ballots", <%= render "refresh_ballots",
investment_ids: @investment_ids, investment_ids: @investment_ids,

View File

@@ -2,10 +2,6 @@ $("#progress_bar").html("<%= j render("budgets/ballot/progress_bar", ballot: @ba
$("#sidebar").html("<%= j render("budgets/investments/sidebar") %>"); $("#sidebar").html("<%= j render("budgets/investments/sidebar") %>");
$("#ballot").html("<%= j render("budgets/ballot/ballot") %>") $("#ballot").html("<%= j render("budgets/ballot/ballot") %>")
$("#<%= dom_id(@investment) %>_ballot").html("<%= j render("/budgets/investments/ballot",
investment: @investment,
investment_ids: @investment_ids,
ballot: @ballot) %>");
<%= render "refresh_ballots", <%= render "refresh_ballots",
investment_ids: @investment_ids, investment_ids: @investment_ids,
ballot: @ballot %> ballot: @ballot %>