Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我通过以下方式成功找到了登录用户的 ID:
#{session['warden.user.user.key'][1][0]}
如何获取用户使用它登录的电子邮件?
当您已经使用 devise 登录时,您可以从current_user对象获取电子邮件
current_user.email