Reputation: 209
I need to pass an extra parameter :mobilejs => true from jQuery to a rails controller. How do I do that?
This...
var settings = $.extend{ 'url': url,
'data' : '{mobilejs:true}',
'success' : callback || function () {},
'dataType' : 'script'
}, options || {});
$.ajax(settings);
creates this response from the server
[2012-06-14 16:05:48] ERROR bad URI `/airports.js?{mobilejs:true}'.
Upvotes: 0
Views: 241