-
Notifications
You must be signed in to change notification settings - Fork 435
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change default action for form submissions that redirect to the curre…
…nt location (#1072) * Change default action for form submissions that redirect to the current location This changes the default action for form submission that redirect to the current location from "advance" to "replace". This makes more sense since we're re-rendering the current page, there should be no new entry in the history. We are also changing the morphing behaviour to only kick in when the visit action is "replace". This is to avoid morphing the page when, for example, we are follwing a link, unless we opt in to morphing by setting the data-turbo-action attribute to replace. The main use case for morphing remains the same: you submit a form that changes some state and refirect to the same location. Turbo handles the redirect and morphs the page to reflect the new state. * Add parentheses to clarify conditional
- Loading branch information
Alberto Fernández-Capel
authored
Nov 20, 2023
1 parent
cc263b4
commit c471974
Showing
4 changed files
with
33 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters