I need to make it so on my webpage the gets the value of the user's balance live. Right now I have the following code to get the value of the user's balance: <%=current_user.balance%>
. The only problem is that it won't update live or close to live (every 5s or so). How can I make it so that the balance can update on the webpage live.
I have read that I should use AJAX, but I am not a pro and therefore do not know exactly how I should proceed.
Thank you. Let me know if I wasn't clear enough.