Ajax on Rails

Remember, that render call you have will force rails to render the
template at that moment.

Just try putting the render call as the last statement in your method,
*after* you set your variables.

Jeff
softiesonrails.com