Skip to content

Instantly share code, notes, and snippets.

@digitalscientists
Created May 7, 2009 15:27
Show Gist options
  • Save digitalscientists/108159 to your computer and use it in GitHub Desktop.
Save digitalscientists/108159 to your computer and use it in GitHub Desktop.
@image_csv = "#{RAILS_ROOT}/lib/installation_image_names.txt"
@names_csv = File.read(@image_csv)
names = @names_csv.collect do |line|
row_values = line.chomp.split(",").collect{|i| i.strip }
Hash[*[:name_on_disk, :actual_name, :style_number].zip(row_values).flatten]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment