Read more

How to access your Rails session ID

Arne Hartherz
April 10, 2013Software engineer at makandra GmbH

This only works when you actually have a session ID (not the case for Rails' CookieStore, for example):

request.session_options[:id]
# => "142b17ab075e71f2a2e2543c6ae34b94"
Illustration online protection

Rails Long Term Support

Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)

  • Prevents you from data breaches and liability risks
  • Upgrade at your own pace
  • Works with modern Rubies
Read more Show archive.org snapshot

Note that it's a bad idea to expose your session ID, so be careful what you use this for.

Posted by Arne Hartherz to makandra dev (2013-04-10 15:36)