how to check rails routes code example Example: check current route rails current_uri = request.env['PATH_INFO']