Write some AJAX magic;) Show the downloadable image upon activation and hide it when the AJAX call is completed. And if you do not want to use AJAX, well, hmm, you can check this:
http://yehudakatz.com/2010/09/07/automatic-flushing-the-rails-3-1-plan/
There is also a pearl that somewhat does this. But I have no experience with this. I would go for the AJAX method =)
EDIT:
, create AJAX jQuery. :
function create() {
$('#loading_image').show();
$.ajax({
type: 'POST',
url: ,
data: $('form').serialize(),
success: createSuccessHandler,
error: createErrorHandler,
complete: hideLoadingImage
});
}
function createSuccessHandler(data) {
alert("User created!")
}
function createErrorHandler(data) {
alert("It failed, ffs!")
}
function hideLoadingImage() {
$('#loading_image').hide()
}