I would like to merge a nested hash.
a = {:book=> [{:title=>\"Hamlet\", :author=>\"William Shakespeare\" }]} b = {:book=> [{
For rails 3.0.0+ or higher version there is the deep_merge function for ActiveSupport that does exactly what you ask for.