Fix specs heading_specs.rb:313

This commit is contained in:
taitus
2019-03-23 21:00:42 +01:00
committed by Julian Herrero
parent 7c5fa253f5
commit fbfe5b3468

View File

@@ -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|