Add order to voted headings names

This commit is contained in:
decabeza
2019-02-12 11:53:03 +01:00
parent 3471cbb979
commit 73a0f999ad
2 changed files with 12 additions and 5 deletions

View File

@@ -128,7 +128,7 @@ class User < ActiveRecord::Base
end
def headings_voted_within_group(group)
Budget::Heading.where(id: voted_investments.by_group(group).pluck(:heading_id))
Budget::Heading.order("name").where(id: voted_investments.by_group(group).pluck(:heading_id))
end
def voted_investments