Skip to content

Instantly share code, notes, and snippets.

# in this version i'm explicitly specifying the serializer to test upgrading from :marshal to :hybrid or :json
require 'cgi'
require 'active_support'
def verify_and_decrypt_session_cookie(
cookie,
serializer = Marshal,
secret_key_base = Rails.application.secret_key_base
)