This post originated from an RSS feed registered with Ruby Buzz
by Red Handed.
Original Post: YAML's Merge Key
Feed Title: RedHanded
Feed URL: http://redhanded.hobix.com/index.xml
Feed Description: sneaking Ruby through the system
Some of you might find YAML’s merge key convenient, especially in your database.yml files within Rails. The merge key basically mixes two hashes together, just like the Hash#merge method. You just place a << key in a hash with a value which is a hash or an array of hashes.
death masks are?:
sad: 2
<<: {magnificent: 4}
Is just like:
death masks are?:
sad: 2
magnificent: 4
So, if you are using the same login for different databases (which is likely very common):