From 1083213ac70ac16cb992be9194876a62be697e37 Mon Sep 17 00:00:00 2001 From: rgarcia Date: Tue, 20 Mar 2018 09:05:23 +0100 Subject: [PATCH] Order budget groups by id MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To maintain order after editing a group’s name We should probably add timestamps to `groups` and `headings` and order by `created_at` instead --- app/views/admin/budgets/show.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/admin/budgets/show.html.erb b/app/views/admin/budgets/show.html.erb index 6c133ab9f..063b025ea 100644 --- a/app/views/admin/budgets/show.html.erb +++ b/app/views/admin/budgets/show.html.erb @@ -3,5 +3,5 @@

<%= @budget.name %>

- <%= render "groups", groups: @budget.groups %> + <%= render "groups", groups: @budget.groups.order(:id) %>