lib/apisync/http/query_string.rb in apisync-0.2.3 vs lib/apisync/http/query_string.rb in apisync-0.3.0
- old
+ new
@@ -44,25 +44,20 @@
#
# This can be used for creating filter querystrings.
def recursive_brackets(hash, prefix = "")
result = []
hash.each do |key, value|
- key = hyphenize(key.to_s)
+ key = key.to_s
if value.is_a?(Hash)
prefix = "#{prefix}[#{key}]"
top_nodes = recursive_brackets(value, prefix)
result << top_nodes
else
result << "#{prefix}[#{key}]=#{value}"
end
end
result
- end
-
- # Converts application_id in application-id.
- def hyphenize(string)
- string.gsub(/_/, "-")
end
end
end
end