...">

Is there an easier way to refresh the page in rails

Guys, I tried to refresh my page with a button. <input type="reset" value="Refresh" />

but it does not refresh, not update jst textboxes to refresh the whole page.

+1


a source to share


3 answers


Try the following:



<INPUT TYPE="button" VALUE="Reload Page" onClick="history.go(0)">

      

+7


a source


I know this post is four years old, but I wanted to put this snippet that I used using Rails formatting.



<%= button_to "Refresh", "", { :onclick => "history.go(0)" } %>

      

+1


a source


in my case this works very well:

= link_to "close", "", :onclick => '$("#ajax_form").hide(); history.go(0); return false;', :style => "color:white"

      

0


a source







All Articles