lib/kindai/util.rb in kindai-1.9.0 vs lib/kindai/util.rb in kindai-2.0.0
- old
+ new
@@ -52,10 +52,10 @@
end
# input: {:a => 'a', :b => 'bbb'}
# output: 'a=a&b=bbb
def self.expand_params(params)
- params.each_pair.map{ |k, v| [URI.escape(k.to_s), URI.escape(v.to_s)].join('=')}.join('&')
+ URI.encode_www_form(params)
end
def self.append_suffix(path, suffix)
path.gsub(/\.(\w+)$/, "-#{suffix}.\\1")
end