Skip to content

armgit / sure

Public Imported from GitHub
0

The personal finance app for everyone (by everyone)

Ruby

feat: sort accounts by name in main page (#19)

Vincent Teoaca1da146f3d
diff --git a/app/models/balance_sheet.rb b/app/models/balance_sheet.rb
index bc5aaf15a8..f7b8cfd8a2 100644
--- a/app/models/balance_sheet.rb
+++ b/app/models/balance_sheet.rb
@@ -13,7 +13,7 @@ class BalanceSheet
@assets ||= ClassificationGroup.new(
classification: "asset",
currency: family.currency,
- accounts: account_totals.asset_accounts
+ accounts: account_totals.asset_accounts.sort_by(&:name)
)
end
@@ -21,7 +21,7 @@ class BalanceSheet
@liabilities ||= ClassificationGroup.new(
classification: "liability",
currency: family.currency,
- accounts: account_totals.liability_accounts
+ accounts: account_totals.liability_accounts.sort_by(&:name)
)
end