I am in need to perform left join between my friends table and In built
LEFT JOIN sessions ON sessions.user_id=friendships.friend_id
To do this, I have altered sessions table to have user_id apart from
what i wud store in session data.
session[:user_id] points to user_id in Data Hash.
session.user_id throws me an error.(undefined method user_id)
How do i set this user_id for the session row when someone logs in? How
can I access session table? How will I know the current session id?