mirror of
https://github.com/gwenhael-le-moine/ledgerrb.git
synced 2025-01-15 15:40:53 +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 ) }
|
accounts += accounts.map { |acc| acc.first( i ) }
|
||||||
end
|
end
|
||||||
|
|
||||||
accounts.uniq.sort.reject { |a| a.empty? }
|
accounts
|
||||||
|
.uniq
|
||||||
|
.sort
|
||||||
|
.reject { |a| a.empty? }
|
||||||
|
.sort_by { |a| a.length }
|
||||||
end
|
end
|
||||||
|
|
||||||
def dates_salaries( category = 'salaire' )
|
def dates_salaries( category = 'salaire' )
|
||||||
|
|
Loading…
Reference in a new issue