A very simple question arises. I do the Michael Hartle Rail Guide and he talks about using the session method:
User login is simple using the session method defined by Rails ... We can process the session as if it were a hash and assign it the following:
session[:user_id] = user.id
It says that you can view the session as if it were a hash, but I'm confused because it is called a session method, so what is actually called? I assume that by inserting into the session hash there is a session function that looks into the hash to see if there is anything present? I'm not sure how this works.
source
share