我有一个Rails5.1应用程序,它使用Devise处理我的User模型的身份验证。这个应用程序有一个Oracle数据库后端,需要在执行任何查询之前为登录用户设置一个系统上下文变量,所以我希望在ConnectionAdapter的:checkout回调中这样做。classApplicationControlleruser_signed_in?方法在:checkout回调block中运行时找不到,尽管它通常在Controller中可用。为什么?此外,block中的current_user似乎计算为ConnectionAdapter中定义的current_user方法,而不是Devise定