Button click, rendering back to the same page

Hi All,

Am having a lot of trouble trying to solve a very simple problem.

I have a button on my form which when clicked needs to do a quick
calculation then returns back to the same page to show the result.


<%=button_to "How much could I potentially borrow?", :action =>
"newmortgagecalc" %>


def newmortgagecalc
  * some calculations here *

What do I need to render in the controller method to get back to the
same page?



render :action => :same_as_the_view

but if th calculation is not persistend (wont be saved to the db), use a js function and make everything in the client side