How can I get the current session id in rails 3?
I've tried the following with no luck:
session[:session_id] session['session_id'] session[:id] session['id'] session.id session.session_id
A session id consists of the hash value of a random string. The random string is the current time, a random number between 0 and 1, the process id number of the Ruby interpreter (also basically a random number) and a constant string. Currently it is not feasible to brute-force Rails' session ids.
Rails store it in server side. Session is saved in server side like key value pair (like json object)
The SessionID property is used to uniquely identify a browser with session data on the server. The SessionID value is randomly generated by ASP.NET and stored in a non-expiring session cookie in the browser. The SessionID value is then sent in a cookie with each request to the ASP.NET application.
It also returns the session ID:
session[:session_id]
Have you tried the following?
request.session_options[:id]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With