I'm currently re-using a partial on two different views.
View A
View B
The partial belongs to Model A but has an association with Model B so it is applicable to Model B as well.
It contains a form and when data is submitted, it always redirects the user to View A. However, when I submit the form from View B, I would like to be redirected back to View B instead of Form A.
The reason it redirects right now to View A is because that's the model this form belongs to. So when posted, it talks to controller A and uses a redirect take the user to a_url.
How can I tell my form (or more so that controller action) to redirect the user back to where they came from?
Thanks!