These are two possibilities. If you use the program, you can use the warden as follows:
current_user = request.env["warden"].user(:user)
or without overseer
User.find_by_id(request.session[:user_id])
if you save your user id in the session: user_id
user1136228
source share