Most of configuration files in ruby such as Gemfile, gemspec, are just ruby code itself. Why database configuration file in rails is the exception?
feedback
|
Personal theory is ruby code is scary to administrators, and the one configuration file they would often have to mess with is the database configuration. YAML is a bit more approachable. | |||||
feedback
|
My guess: For configuration of a common module across environments it is the most concise way of doing so. To do it in Ruby adds more complexity to the file. You would have to ask the original designer though to get the real answer. | |||
feedback
|
kinda like mvc and the separation of concerns. One part is the program to read and use the values. The other part is the values themselves in a given format. This allow you to either change or hide either portion It's all about common formats for data. | |||
feedback
|