Skip to content
This repository has been 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

Open
andrewhavens opened this issue Jan 11, 2018 · 2 comments

Comments

@andrewhavens
Copy link

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!

@MrHubble
Copy link

@andrewhavens is this still an issue for you?

@andrewhavens
Copy link
Author

@MrHubble Yes, I’m not sure how to achieve this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants