Skip to content

Instantly share code, notes, and snippets.

@forced-request
Created September 9, 2014 01:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save forced-request/7656816db64f46689ce8 to your computer and use it in GitHub Desktop.
Save forced-request/7656816db64f46689ce8 to your computer and use it in GitHub Desktop.
reset_session
def reset_session
session.destroy if session && session.respond_to?(:destroy)
self.session = {}
@env['action_dispatch.request.flash_hash'] = nil
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment