So what remains is the "How to get the url to return to?" question
method, grab the url from the current controller/action if it is too late in the process and the current action gives you the action that has already been moved on to in the after filter then use a before_filter to stuff it into another session variable the you can then use in the after filter to set the value for the return_to key.
Possibly worth trying
but as there seems to be an issue with the request object in Safari 7, I am not comfortable with suggesting this as a solution for this particular case.
So you might want to try
instead. I'm not sure if controller_path will provide any params that are needed though.
Hope that makes sense. If you need further help just shout