AlchemyCMS/alchemy_cms

View on GitHub
app/views/alchemy/base/redirect.js.erb

Summary

Maintainability
Test Coverage
(function() {
  var dialog = Alchemy.currentDialog();
  var callback = function() {
    Turbo.visit('<%= url_for(@redirect_url) %>');
  };
  if (dialog) {
    Alchemy.closeCurrentDialog(callback);
  } else {
    callback();
  }
})();