I’m very new to RoR, and am trying to implement a user login system. I’ve got most of it working, but I’m trying to work out how I refer to the logged in user across many different views/controllers etc. Can I store the user in the session? Or is there a better way to do it?
Thanks for reading
You would more likely store the user id in the session, then get the actual user from somewhere else, like your datastore. That said, there are plugins to do authentication already, and you wouldn’t need to worry about any of this if you used one.