How to Merge a YAML File Into a Single Hash in Ruby
require 'yaml' # Nested YAML structure from something-nested.yml # # nested: # key: value # key_two: value_two # Procedural Approach to building a single Hash from nested YAML data structure. @yaml = YAML.load_file("something-nested...
Written by Sean Behan on 06/17/2012
Rake DB Everything, Dump, Destroy, Create, Load
I'm a big fan of the yaml_db plugin. But I don't like running rake db:data:load, only to find that my db columns mismatch my model attributes, thus aborting the data import task. To quickly add/remove columns/attributes from a model and rebuild the datab...
Written by Sean Behan on 06/17/2012
Manage Fixtures with Yaml DB Plugin for Rails
Get the plugin like so... script/plugin install git://github.com/adamwiggins/yaml_db.git This command will dump your data rake db:data:dump And load it back rake db:data:load Beautiful :) More info here http://blog.heroku.com/archives/2007/11/23/yam...
Written by Sean Behan on 06/17/2012