Order budget headings by id

To maintain order after editing a heading’s name

We should probably add timestamps to `groups` and `headings` and order
by `created_at` instead

Could have done it in a separate PR, but gotta keep moving to other
priority issues. Creating issue for timestamps to do correctly and with
tests 😌
This commit is contained in:
rgarcia
2018-03-20 09:14:12 +01:00
parent 1083213ac7
commit c908e91f00

View File

@@ -14,6 +14,6 @@
<% groups.each do |group| %>
<div id="<%= dom_id(group) %>">
<%= render "admin/budgets/group", group: group, headings: group.headings %>
<%= render "admin/budgets/group", group: group, headings: group.headings.order(:id) %>
</div>
<% end %>