Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianthedev authored Aug 2, 2023
1 parent 4d88d68 commit 176de7a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
9 changes: 4 additions & 5 deletions docs/2.0/actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,21 +204,20 @@ 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
self.name = "Dummy action"
self.turbo = false
def handle(**args)
redirect_to "https://www.google.com/"
redirect_to "https://www.google.com/" # external link
end
end
```
Expand Down
7 changes: 3 additions & 4 deletions docs/3.0/actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 176de7a

Please sign in to comment.