Implements bi.should_show_ballots?

This commit is contained in:
kikito
2016-12-02 20:10:07 +01:00
parent 6aab9f5253
commit f677d90f73
2 changed files with 5 additions and 1 deletions

View File

@@ -199,6 +199,10 @@ class Budget
budget.selecting? || budget.on_hold?
end
def should_show_ballots?
budget.balloting?
end
private
def set_denormalized_ids

View File

@@ -64,7 +64,7 @@
vote_url: vote_budget_investment_path(investment.budget, investment, value: 'yes')
} %>
</div>
<% else %>
<% elseif investment.sould_show_ballots? %>
<div id="<%= dom_id(investment) %>_ballot">
<%= render 'ballot', investment: investment %>
</div>