Where Does current_user Actually Live?
𝚌𝚞𝚛𝚛𝚎𝚗𝚝_𝚞𝚜𝚎𝚛 reads like global state, but Rails request identity moves through the session, Warden, Devise helpers, optional 𝙲𝚞𝚛𝚛𝚎𝚗𝚝𝙰𝚝𝚝𝚛𝚒𝚋𝚞𝚝𝚎𝚜, and executor cleanup. This article traces that lifecycle and the production bugs that appear when those boundaries are confused.
https://railsrevelry.substack.com/p/where-does-current-user-actually-live
Post a comment