Topic: using ajax and erb to ease delayed rendering of a view
hi, i'm relatively new to ror and even more new to ajax so i'm not sure this is even possible but here goes.
when users submit info to my app, it kicks off a lengthy process that they wait for to complete, which delays the next view from rendering. to avoid a delay in rendering the view, i'd like to render a view immediately that says "please wait while your results are generated..." the view in the meantime would use ajax to start the lengthy process. when the process is complete, a div in the view would be updated using erb and instance variables from the controller's action to show results of the lengthy process. something like this for example:
feedback = new Ajax.Updater( 'feedback', '/answer/feedback',
please wait while your results are generated...
what i'm trying to find out is, is it possible to stick erb in a div element after process completion and will it get evaluated? if that is possible could you point me to an example that solves this kind of scenario? and what are typical solutions to long process scenarios like this? if there are other ways to handle this i'd appreciate hearing them as well. thanks for any replies.