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:
@@ -1,9 +1,5 @@
|
||||
$("#progress_bar").html("<%= j render("/budgets/ballot/progress_bar", ballot: @ballot) %>");
|
||||
$("#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",
|
||||
investment_ids: @investment_ids,
|
||||
|
||||
@@ -2,10 +2,6 @@ $("#progress_bar").html("<%= j render("budgets/ballot/progress_bar", ballot: @ba
|
||||
$("#sidebar").html("<%= j render("budgets/investments/sidebar") %>");
|
||||
$("#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",
|
||||
investment_ids: @investment_ids,
|
||||
ballot: @ballot %>
|
||||
|
||||
Reference in New Issue
Block a user