Created
January 5, 2017 11:21
-
-
Save nicolasmarcal/b62842122775e73819f109e553a78c5d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File.open("taxons_report.csv", "w") do |file| | |
file.puts "SKU;NOME;CATEGORIAS" | |
Spree::Variant.all.each do |variant| | |
file.puts "#{variant.sku};#{variant.product.name};#{variant.product.taxons.map(&:name).join(';')}" | |
end | |
end;nil |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment