I'm trying to store some configuration variables in yaml represented as an associative array aka dictionary. Here is how I did:
content_prices:
- {country: AU, price: 6990000}
- {country: AT, price: 4990000}
- {country: BE, price: 4990000}
This produce an exception when I try to parse it from my ROR init files:
undefined method `symbolize_keys!' for nil:NilClass
Here is how I init it:
Config = YAML.load_file("#{Rails.root}/config/prices.yml")[Rails.env].symbolize_keys!
I guess my yaml syntax is wrong, then how to write it properly ?