I am using rails 4.1.2. I need to use to redirect a parent window from an iframe. I use a redirect url in the iframe to logout of the application. The view corresponding to the logout action in the controller contains the following code.
$( document ).ready(function() {
window.top.location.href = '<%= @redirect_url %>';
});
The code above works fine in chrome, but doesn't work in firefox browser. Could anybody help me with it?
Thanks for your valuable time.