sorting accounts list

This commit is contained in:
Gwenhael Le Moine 2015-09-13 16:32:37 +02:00
parent 85ba7103d2
commit d0c289e3c3

View file

@ -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' )