class Hashie::Mash
def deep_update(other_hash)
Recursively merges this mash with the passed
def deep_update(other_hash) other_hash = Hashie::Hash[other_hash].stringify_keys! other_hash.each_pair do |k,v| k = convert_key(k) self[k] = Hashie::Mash.new(self[k]).to_mash if self[k].is_a?(Hash) unless self[k].is_a?(Hashie::Mash) if self[k].is_a?(Hashie::Mash) && other_hash[k].is_a?(Hash) self[k] = self[k].deep_merge(other_hash[k]) else self[k] = convert_value(other_hash[k],true) end end self end