Avoid listing non-published Budgets to the public

Why:

Non-admins shouldn't be aware of non-published Budgets

How:

Using the budget_published? helper method
This commit is contained in:
Bertocq
2018-01-08 23:02:18 +01:00
parent 76e05d58b1
commit 4916f9a3c3

View File

@@ -16,14 +16,16 @@
</thead>
<tbody>
<% @budgets.each do |budget| %>
<tr>
<td>
<%= link_to budget.name, budget %>
</td>
<td>
<%= budget.translated_phase %>
</td>
</tr>
<% if budget_published?(budget) %>
<tr>
<td>
<%= link_to budget.name, budget %>
</td>
<td>
<%= budget.translated_phase %>
</td>
</tr>
<% end %>
<% end %>
</tbody>
</table>