mirror of
https://github.com/gwenhael-le-moine/ledgerrb.git
synced 2024-12-26 09:59:18 +01:00
sorting accounts list
This commit is contained in:
parent
85ba7103d2
commit
d0c289e3c3
1 changed files with 5 additions and 1 deletions
|
@ -31,7 +31,11 @@ module Ledger
|
|||
accounts += accounts.map { |acc| acc.first( i ) }
|
||||
end
|
||||
|
||||
accounts.uniq.sort.reject { |a| a.empty? }
|
||||
accounts
|
||||
.uniq
|
||||
.sort
|
||||
.reject { |a| a.empty? }
|
||||
.sort_by { |a| a.length }
|
||||
end
|
||||
|
||||
def dates_salaries( category = 'salaire' )
|
||||
|
|
Loading…
Reference in a new issue