I have written a custom ajax function which uses POST and I need to show the pace progress bar until the ajax stops and returns. It is working fine for GET request because there is no config needed. I need to know how to set a method to show the Pace on ajax calls.
gem 'pace-rails'
Jquery for all ajax requests.
$(document).on({
ajaxStart: function() { Pace.start() },
ajaxStop: function() { Pace.stop() }
});