Use scope to order headings by name
This commit is contained in:
@@ -65,7 +65,7 @@
|
||||
<% @budget.groups.each do |group| %>
|
||||
<h2><%= group.name %></h2>
|
||||
<ul class="no-bullet">
|
||||
<% group.headings.order(name: :asc).each do |heading| %>
|
||||
<% group.headings.order_by_group_name.each do |heading| %>
|
||||
<li class="heading small-12 medium-4 large-2">
|
||||
<%= link_to budget_investments_path(@budget.id, heading_id: heading.id) do %>
|
||||
<%= heading.name %>
|
||||
|
||||
Reference in New Issue
Block a user