Please read for an updated status on RailsCasts:
Learn more or hide this
GitHub User: fxposter
Unfortunately, "redirect_to redirect_url, only_path: true" won't work. It works only, when you pass first argument as a Hash and it should contain :only_path options. When you have redirect_url as a string you can use URI.parse(redirect_url).path or URI.parse(redirect_url).request_uri, hovewer request_uri is available only on URI::HTTP objects, so additional checks might be needed.