From fbfe5b3468887a4e7dd8fa83d1beeae43cce1d84 Mon Sep 17 00:00:00 2001 From: taitus Date: Sat, 23 Mar 2019 21:00:42 +0100 Subject: [PATCH] Fix specs heading_specs.rb:313 --- app/models/budget/heading.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/budget/heading.rb b/app/models/budget/heading.rb index 4c427759f..40a534f55 100644 --- a/app/models/budget/heading.rb +++ b/app/models/budget/heading.rb @@ -40,8 +40,8 @@ class Budget delegate :budget, :budget_id, to: :group, allow_nil: true - scope :i18n, -> { includes(:translations) } - scope :allow_custom_content, -> { i18n.where(allow_custom_content: true).order(:name) } + scope :i18n, -> { joins(:translations) } + scope :allow_custom_content, -> { i18n.where(allow_custom_content: true).order("budget_heading_translations.name") } def self.sort_by_name all.sort do |heading, other_heading|