I have a page whose path is (e.g.) /premises/92 on which I\'m displaying \"please [log in] or [register] for additional information\" if the user is not logged in, and I wan
Devise looks for the key "#{resource}_return_to" in the session.
Here I am quoting the API:
By default, it first tries to find a valid #{resource}_return_to key in
the session, then it fallbacks to #{resource}_root_path, otherwise it
uses the root_path.