Implements bi.should_show_ballots?
This commit is contained in:
@@ -199,6 +199,10 @@ class Budget
|
||||
budget.selecting? || budget.on_hold?
|
||||
end
|
||||
|
||||
def should_show_ballots?
|
||||
budget.balloting?
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def set_denormalized_ids
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user