I am a newbie in Ruby On Rails, Can someone tell me how to refresh a page.
ActionView::Helpers::PrototypeHelper#periodically_call_remote:
Without any values submitted
<%= periodically_call_remote(:url => {}) %>
With previous values resubmitted:
<%= periodically_call_remote(:url => params) %>
You can provide a :frequency option to specify how often to call it.
You may also want to set up the format.js block in the controller to render an RJS template that will only update things that could change.
Edit: This approach was deprecated with version Rails 3.0
This question (Rails 3 equivalent for periodically_call_remote) provides a method for accomplishing this in newer versions of Ruby on Rails.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With