]> nos-oignons.net Git - gestion-adh.git/blobdiff - bin/list-emails
Finish implementing list-emails
[gestion-adh.git] / bin / list-emails
index 4c8a286f627792b0e12b0b64520abd8c2c7c9eb0..935bcd021a4b25043690fe547f64e7c8b6deda44 100755 (executable)
@@ -10,7 +10,7 @@ require 'nos_oignons/subscriptions'
 subscriptions = read_subscriptions
 now = Time.now
 last_year = Time.new(now.year - 1, now.month, now.day).to_date
 subscriptions = read_subscriptions
 now = Time.now
 last_year = Time.new(now.year - 1, now.month, now.day).to_date
-subscriptions.each_pair do |subscription_id, data|
+subscriptions.sort.each do |subscription_id, data|
   if data['membership_fee_paid_on'] && last_year < data['membership_fee_paid_on']
     puts data['email']
   end
   if data['membership_fee_paid_on'] && last_year < data['membership_fee_paid_on']
     puts data['email']
   end