Use jQuery.param for generating query string

This commit is contained in:
Piotr Sarnacki 2013-05-14 02:21:34 +02:00
parent 3f30f3eec9
commit ebeaabe598

View File

@ -64,11 +64,7 @@ Travis.ajax = Em.Object.create
return $.ajax(options)
if options.data && (method == "GET" || method == "HEAD")
params = []
for key, value of options.data
params.pushObject("#{key}=#{value}")
params = params.join '&'
params = jQuery.param(options.data)
delimeter = if url.indexOf('?') == -1 then '?' else '&'
url = url + delimeter + params