Can you use another way such as `request.original_url` if it's working. And obviously `link_to` replace `url_for`.