这是indexloc提供的服务,不要输入任何密码
Skip to content

A form with delete action fails to replace #1432

@hellcp-work

Description

@hellcp-work

So I have two frames as follows:

<turbo-frame id="navigation">
  <form action="/contents/10" data-remote="true" method="post" data-turbo-frame="content-10">
    <input type="hidden" name="_method" value="delete">
    <input type="submit" value="Remove">
  </form>
</turbo-frame>
<turbo-frame id="content-10">
  Contents
</turbo-frame>

When pressing the Remove button, two requests are sent: POST and GET. The first POST returns a turbo frame with the contents I would like the second frame to include, and the second request tries to load contents of an already deleted object which predictably fails, redirecting me to an error page.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions