Implements bi.should_show_ballots?
This commit is contained in:
@@ -199,6 +199,10 @@ class Budget
|
|||||||
budget.selecting? || budget.on_hold?
|
budget.selecting? || budget.on_hold?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def should_show_ballots?
|
||||||
|
budget.balloting?
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def set_denormalized_ids
|
def set_denormalized_ids
|
||||||
|
|||||||
@@ -64,7 +64,7 @@
|
|||||||
vote_url: vote_budget_investment_path(investment.budget, investment, value: 'yes')
|
vote_url: vote_budget_investment_path(investment.budget, investment, value: 'yes')
|
||||||
} %>
|
} %>
|
||||||
</div>
|
</div>
|
||||||
<% else %>
|
<% elseif investment.sould_show_ballots? %>
|
||||||
<div id="<%= dom_id(investment) %>_ballot">
|
<div id="<%= dom_id(investment) %>_ballot">
|
||||||
<%= render 'ballot', investment: investment %>
|
<%= render 'ballot', investment: investment %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user