I\'m working on an application that needs to use session id information. My session is stored in cookies. The problem I have is that my session is not immediately available
Here's some relevant code from ActionDispatch::Session:
def [](key) load_for_read! @delegate[key.to_s] end private def load_for_read! load! if !loaded? && exists? end
Which implies that the session object will be loaded as soon as you access any value by its key via [].
[]