thoughtbot/clearance — pull request #411 by calebthompson (2014-03-07 15:31:23+00:00)
Title: Preserve as much of the redirect URL as possible

Discard only the portion of the redirect_url _after_ the host and port, which
will exclude the scheme, host, and port while preserving path, query, and
fragment.

http://foo.com:1234/posts?id=30&limit=5#time=1305298413

is transformed to

/posts?id=30&limit=5#time=1305298413