ruby on rails - Hash inside YAML file? -


I want to include the list inside a hash and a YAML file that I am parsing with the following command:

APP_CONFIG = YAML.load_file ("# {RAILS_ROOT} /config/config.yml"}

My YAML file looks like this:

  Feed: [[url = & gt; 'Http://www.google.com' ,: label = & gt; 'Default'}]  

But it does not seem to work.

Thanks, Yuval


EDIT: Sorry, guys. I'm still not clear about how to do this and I suspect that this is part of me due to some obscure phrasing. I asked a better-phrased, more detailed question. Thanks!

You can mark it like this

  Feed: - Url: 'http://www.google.com' label: 'default'  

Note that the spaces are important here. "-" Should be indented by a single location (not a tab), and after a single location. And url & amp; Labels must be jagged in two places (if not tab).

In addition to this it can be helpful:


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -