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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user