I have been working on making an AJAX progress bar using a padrino framework. Using jQuery I make a GET request to a special page that will return to it a status update. But the actual rendering and processing take place on the POST page. Here's a stripped out version of my controller:
#Starting page
get :index do
render 'start'
end
#returns a status string to jquery request
get :statusPage do
return getStatus()
end
#Confirmation page
get :confirmation do
render 'confirmComplete'
end
#Problem route not rendering before working!
post :title do
render 'progress'
mainProcessing()
end
The idea is that the progress page can monitor the main method and update it's graphic to show the user some progress. The problem is that Padrino will always run all helper methods first, and render last, which promptly jumps to my confirmation page. Is there anyway to force Padrino to run in the order I specified?