Working on a Ruby on Rails app with Devise.
Devise only redirects to a fixed path, root app path by default.
There are protected urls, and if the user click some links (e.g. “Ask Question” here), he is sent to the /sign_in page. On successful logon, the user is not sent back to the “Ask Question”, but rather to “/”.
Any idea how to fix that?
Makinng the original request GET instead of POST resolved the issue.
It was initially wrong to redirect to POST. Unfortuntely if the user was trying to update any data he will be forced to re-enter and re-submit, the solution here is to disallow users to enter any data which they will not be able to submit if they are not logged in.