module Roda::RodaPlugins::Sessions::InstanceMethods
Public Instance Methods
Source
# File lib/roda/plugins/sessions.rb, line 216 def clear_session session.clear env.delete(SESSION_CREATED_AT) env.delete(SESSION_UPDATED_AT) nil end
Clear data from the session, and update the request environment so that the session cookie will use a new creation timestamp instead of the previous creation timestamp.
Private Instance Methods
Source
# File lib/roda/plugins/sessions.rb, line 228 def _roda_after_50__sessions(res) if res && (session = env['rack.session']) @_request.persist_session(res[1], session) end end
If session information has been set in the request environment, update the rack response headers to set the session cookie in the response.