You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
controller: redirect_to favorites_path, notice: "added to favorites", status: :see_other
In the browser everything works correctly but in turbo native mobile app :replace action is ignored and fallback to advance. I tried to search in the code for link_to with non-get method and I didn't find where the turbo-action method being set.
After rewrite to button_to everything works correctly: button_to add_to_favorites(id: id), class: 'button', data: { disable_with: "Adding..."), turbo_action: "replace" } do ...
Another link_to with data-turbo-method: :delete behaves the same way
Is my guess correct and link_to with data-turbo-method ignores data-turbo-action?
The text was updated successfully, but these errors were encountered:
Hello,
We are trying to migrate from Turbolinks to Turbo and we also use turbo ios app.
with turbolinks we used this:
view:
link_to add_to_favorites_path(id: id), method: :post, remote: true, class: 'button', data: { disable_with: _("Adding...")} do ...
controller:
redirect_back favorites_path, notice: "added to favorites", turbolinks: :replace
after rewriting to turbo:
view:
link_to add_to_favorites_path(id: id), class: 'button', data: { turbo_method: :post, disable_with: _("Adding..."), turbo_action: "replace" } do ...
controller:
redirect_to favorites_path, notice: "added to favorites", status: :see_other
In the browser everything works correctly but in turbo native mobile app :replace action is ignored and fallback to advance. I tried to search in the code for link_to with non-get method and I didn't find where the turbo-action method being set.
After rewrite to button_to everything works correctly:
button_to add_to_favorites(id: id), class: 'button', data: { disable_with: "Adding..."), turbo_action: "replace" } do ...
Another link_to with data-turbo-method: :delete behaves the same way
Is my guess correct and link_to with data-turbo-method ignores data-turbo-action?
The text was updated successfully, but these errors were encountered: