jdog
jdog

Reputation: 10759

ruby ajax request with params

Is this proper when making an ajax request via ruby to use two params?

function drawIt(one_id, quest_id){
  var request = $.ajax({
    url: "/reer/porip?rn_id=" + one_id + "?two_id=" + quest_id,
    type: "GET",
    dataType: "json"
  });

Upvotes: 1

Views: 48

Answers (1)

djaszczurowski
djaszczurowski

Reputation: 4515

it's ok, however you have double ? char in url. It should be:

url: "/reer/porip?rn_id=" + one_id + "&two_id=" + quest_id,

parameters in url are separated by &

Upvotes: 1

Related Questions