Order headings by name and group
Note that we are relying on the existing `sort_by_name`[1] method in the `Budget::Heading` class. This method sorts by DESC group name first and then ASC heading name. [1] https://github.com/AyuntamientoMadrid/consul/pull/1875
This commit is contained in:
committed by
Javi Martín
parent
7b2495845d
commit
abb6eb18b0
@@ -46,10 +46,8 @@
|
||||
<h3 class="margin-bottom">
|
||||
<%= t("budgets.results.heading_selection_title") %>
|
||||
</h3>
|
||||
<ul class="menu vertical no-margin-top no-padding-top">
|
||||
|
||||
|
||||
<% @budget.headings.order("id ASC").each do |heading| %>
|
||||
<ul id="headings" class="menu vertical no-margin-top no-padding-top">
|
||||
<% @headings.each do |heading| %>
|
||||
<li>
|
||||
<%= link_to heading.name,
|
||||
budget_results_path(@budget, heading_id: heading.to_param),
|
||||
|
||||
Reference in New Issue
Block a user