lib/angelo/params_parser.rb in angelo-0.1.15 vs lib/angelo/params_parser.rb in angelo-0.1.16

- old
+ new

@@ -32,13 +32,23 @@ body = parse_formencoded body qs.merge! body when json? body = EMPTY_JSON if body.empty? body = JSON.parse body - qs.merge! body + recurse_symhash qs.merge! body else qs end + end + + def recurse_symhash h + h.each do |k,v| + if Hash === v + h[k] = Responder.symhash.merge! v + recurse_symhash h[k] + end + end + h end def form_encoded? content_type? FORM_TYPE end