How to load a YAML config object

June 10, 2009

One of Rails’ selling points is convention over configuration, but most apps do need some configuration. database.yml is a great example.

Here’s some code that loads data into a ruby class from a YAML config file. Just like database.yml the configuration is specific to the rails environment you’re running in.