Search code examples
ruby-on-rails-3prototypejs

Rails: periodically_call_remote then redirect


I need to check some database values with a periodically_call_remote function. I want to redirect if some values have already a certain state.

How to do this? redirect_to in the function does not seem to work.


Solution

  • Do you need to do a refresh on the entire page? You could use javascript to update your content.

    The following javascript may work as well.

    window.location = "http://www.address.com/"