From bf6e530e5d37d9d99fb97017a18c31ab851bd150 Mon Sep 17 00:00:00 2001 From: Alter Lagos Date: Mon, 30 Sep 2024 18:31:16 +1300 Subject: [PATCH] Sort currencies by name as a second order --- app/helpers/forms_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/forms_helper.rb b/app/helpers/forms_helper.rb index 56b065548ea..49f303cb974 100644 --- a/app/helpers/forms_helper.rb +++ b/app/helpers/forms_helper.rb @@ -23,7 +23,7 @@ def period_select(form:, selected:, classes: "border border-alpha-black-100 shad end def currencies_for_select - Money::Currency.all_instances.sort_by(&:priority) + Money::Currency.all_instances.sort_by { |currency| [ currency.priority, currency.name ] } end private