Skip to content

Instantly share code, notes, and snippets.

@epochwolf
Created May 22, 2012 21:45
Show Gist options
  • Save epochwolf/a19133e6659edb8c9d35 to your computer and use it in GitHub Desktop.
Save epochwolf/a19133e6659edb8c9d35 to your computer and use it in GitHub Desktop.
ACORD_CODES = {}
# Load acord codes from a fixture into memory
require 'csv'
CSV.foreach(File.join(Rails.root, 'db/acord_codes.csv'), headers: true) do |row|
ACORD_CODES[row[0]] ||= {}
ACORD_CODES[row[0]][row[1]] = row[2]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment