Skip to content
This repository was archived by the owner on Sep 25, 2021. It is now read-only.
This repository was archived by the owner on Sep 25, 2021. It is now read-only.

How to avoid redirecting to a single route when using remote: true link from two different pages #33

Description

@andrewhavens

Sorry, I've tried to find the answer to this question but I haven't been able to find it anywhere. In my Rails app, I use <%= link_to ... remote: true %> to perform AJAX create/update requests. However, I'm trying to call the same controller action from two different pages, which means, in one scenario it's redirecting to the wrong place. I'd like for the page to simply refresh itself once the call has finished successfully, but instead, it currently redirects to the location that the controller specifies. The whole point of using the link_to ... remote: true syntax is that it's quick and easy, so I hope to find a simple/supported way to do this. Thanks!

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