On Tue, Oct 26, 2010 at 3:40 PM, Creative Technologist <
richard-DXT9u3ndKiRtdF/iL03xVL6Z9KU14Uj5tUK59QYPAWc@public.gmane.org> wrote:
> 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.
>
> VIEW.
>
> <%=button_to "How much could I potentially borrow?", :action
=>
> "newmortgagecalc" %>
>
> CONTROLLER
>
> def newmortgagecalc
> * some calculations here *
> render
> end
>
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
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.