debugging your RJS calls (+1)
Sometimes you just need to see exactly what your RJS templates are returning. There’s an issue currently where Rails will send an HTML exception stack trace when the controller or view errors, for example. So, your spinners keep on spinning and the user has no idea what’s going on. This Ajax Responder will hopefully help you troubleshoot these cases.
Remember to add a div with an id of debug to your page…
Ajax . Responders . register ({ / / log the beginning of the requests onCreate : function ( request , transport ) { new Insertion . Bottom (' debug ', ' <p><strong>[ ' + new Date (). toString () + ' ] accessing ' + request . url + ' </strong></p> ') }, / / log the completion of the requests onComplete : function ( request , transport ) { new Insertion . Bottom (' debug ', ' <p><strong>http status: ' + transport . status + ' </strong></p> ' + ' <pre> ' + transport . responseText . escapeHTML () + ' </pre> ') } });


Loading...