Accessing session variables

-- --
2006-11-15T02:25:01Z

I need to reference the user ID variable in a view and I am uncertain of
the proper syntax. The user ID is stored in a session variable. What is
the proper syntax to use?

(Also, are there any useful references for ruby syntax online? I can''t
seem to find any good ones.)

For reference, here is a dump of the session info:

--- !ruby/object:CGI::Session
data: &id001
  user: !ruby/object:User
    attributes:
      id: "1"
      password: c90121c2fbb54ec2133fb0c868dc1b04e354fe66
      login: jsmith
  flash: !map:ActionController::Flash::FlashHash {}