Show headings in budgets landing page when translations are missing
This commit is contained in:
@@ -27,7 +27,7 @@ class Budget
|
||||
delegate :budget, :budget_id, to: :group, allow_nil: true
|
||||
|
||||
scope :i18n, -> { includes(:translations) }
|
||||
scope :with_group, -> { joins(group: :translations).where("budget_group_translations.locale = ?", I18n.locale) }
|
||||
scope :with_group, -> { includes(group: :translations) }
|
||||
scope :order_by_group_name, -> { i18n.with_group.order("budget_group_translations.name DESC") }
|
||||
scope :order_by_heading_name, -> { i18n.with_group.order("budget_heading_translations.name") }
|
||||
scope :order_by_name, -> { i18n.with_group.order_by_group_name.order_by_heading_name }
|
||||
|
||||
Reference in New Issue
Block a user