We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Sessions are disabled by default. Add the following at the top-level of your app to enable:
enable :sessions
The session Hash is then available in routes, filters, and error handlers:
session
get '/' do session["counter"] ||= 0 session["counter"] += 1 "You've it this page #{session["counter"]} time(s)" end
The Book includes additional detail on using Sessions:
http://localhost:4000/book.html#sessions