RailsCasts Pro episodes are now free!
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.