Revision: 43499
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at March 25, 2011 05:13 by andresbravog
Initial Code
users_params = ['600203389', '616487321', '622242409', '622280776', '625902608', '626383823', '628421395', '628922862', '633623378', '635232596', '635496283', '636931966', '639565592', '644360760', '644376209', '645909745', '658539781', '659039288', '659417827', '660119737', '666261379', '666279407', '668829310', '670495225', '675319539', '677320912', '677635338', '679628257', '680831293', '686272477', '687998501', '693777289'] users = User.find(:all, :conditions => ['login in (?)', users_params ]) paid_users = [] users.each do |user| if user && !user.payment_requested.nil? fail = false begin UserPayment.pay(user) user.reload paid_users << user rescue Exception => msg fail = true puts "* user [#{user.login}] : Impossible to pay to this user: " + msg end paid_users << user unless fail puts "* user [#{user.login}] : user paid " unless fail else if user.nil? "* user [#{user.login}] : This user does not exists " else "* user [#{user.login}] : Any payment requested by this user " end end end
Initial URL
Initial Description
is for easy pay
Initial Title
List of users for pay in Qustodian
Initial Tags
ruby
Initial Language
Ruby