How to make a list of associative array in yaml

Your YAML looks okay, or you can configure an array of hashes like this :

content_prices:
  - country: AU
    price: 6990000
  - country: AT
    price: 4990000
  - country: BE
    price: 4990000

Which will load as the following hash:

{"content_prices"=>[
  {"country"=>"AU", "price"=>6990000}, 
  {"country"=>"AT", "price"=>4990000}, 
  {"country"=>"BE", "price"=>4990000}]}

But that still doesn’t give you any reference to the Rails.env in the main hash. The problem seems to be what you’re expecting to be in your hash rather than the format of the YAML.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)