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