Skip to content

Instantly share code, notes, and snippets.

@kreas
Last active December 17, 2015 02:12
Show Gist options
  • Save kreas/d53917d348fb0ec5d028 to your computer and use it in GitHub Desktop.
Save kreas/d53917d348fb0ec5d028 to your computer and use it in GitHub Desktop.
update tracking information
data.map! { |d| d[2] = Date.strptime(d[2], "%m/%d/%Y"); d }
data.each { |d| Order.where(invoice_number: d[0]).first.update_attributes(status: 'completed', shipping_detail: { carrier: 'USPS', tracking_number: d[1], ship_date: d[2] } ) rescue nil }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment