Skip to content

Instantly share code, notes, and snippets.

@absyah
Last active April 16, 2018 08:09
Show Gist options
  • Save absyah/617e5e777fd748e5e942baddf8e1b53f to your computer and use it in GitHub Desktop.
Save absyah/617e5e777fd748e5e942baddf8e1b53f to your computer and use it in GitHub Desktop.
mass linking script
csv_text = File.read('/home/ardian/Downloads/mass_link.csv')
csv = CSV.parse(csv_text, :headers => true)
csv.each do |row|
hash = row.to_hash
hash['SKU Elevenia']
hash['Master SKU Forstok']
MassLink.new(hash['Master SKU Forstok'], hash['SKU Elevenia']).link
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment