From 176de7abd7125e30bf345cdb5eccf0f7abe86732 Mon Sep 17 00:00:00 2001 From: Adrian Marin Date: Wed, 2 Aug 2023 12:13:03 +0300 Subject: [PATCH] Apply suggestions from code review --- docs/2.0/actions.md | 9 ++++----- docs/3.0/actions.md | 7 +++---- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/docs/2.0/actions.md b/docs/2.0/actions.md index ece239e6..899ebb46 100644 --- a/docs/2.0/actions.md +++ b/docs/2.0/actions.md @@ -204,13 +204,12 @@ end -:::info -If action is redirecting to an external link check the `turbo` option. - +:::warning +If you're redirecting to an external link you should add the `self.turbo = false` option in order to bypass [Turbo's navigation](https://turbo.hotwired.dev/handbook/drive#disabling-turbo-drive-on-specific-links-or-forms). ::: :::option `turbo` -There are times when turbo is not desired, such as when the action leads to an external link. In such cases, turbo should be set to false. +There are times when you don't want to perform the actions with Turbo, such as when the action leads to an external link or you might download a file. In such cases, turbo should be set to false. ```ruby{3,6} class DummyAction < Avo::BaseAction @@ -218,7 +217,7 @@ class DummyAction < Avo::BaseAction self.turbo = false def handle(**args) - redirect_to "https://www.google.com/" + redirect_to "https://www.google.com/" # external link end end ``` diff --git a/docs/3.0/actions.md b/docs/3.0/actions.md index ebed3065..46bf4e44 100644 --- a/docs/3.0/actions.md +++ b/docs/3.0/actions.md @@ -206,13 +206,12 @@ end -:::info -If action is redirecting to an external link check the `turbo` option. - +:::warning +If you're redirecting to an external link you should add the `self.turbo = false` option in order to bypass [Turbo's navigation](https://turbo.hotwired.dev/handbook/drive#disabling-turbo-drive-on-specific-links-or-forms). ::: :::option `turbo` -There are times when turbo is not desired, such as when the action leads to an external link. In such cases, turbo should be set to false. +There are times when you don't want to perform the actions with Turbo, such as when the action leads to an external link or you might download a file. In such cases, turbo should be set to false. ```ruby{3,6} class Avo::Actions::DummyAction < Avo::BaseAction