This JSON message works, but if I quickly click on them, they will start returning 500 errors. I guess this is because they are not in the queue correctly, and they fall apart when they cannot go out one by one. Is there a way to queue in JSON?
Here is my button in HAML:
= f.check_box :has_sticker, :style => 'width: 20px;', :class => "orgs_deals_admin_save"
And here is my jQuery:
$('.orgs_deals_admin_save').live('click', function() { var button = $(this); var form = button.closest('form'); var dataString = form.serialize(); $.ajax({ url: form.attr('action') + '.json', dataType: 'json', type: 'POST', data: dataString, success: function(data) { } }); });
source share