Skip to content

Instantly share code, notes, and snippets.

@truongnmt
Created January 4, 2022 11:30
Show Gist options
  • Save truongnmt/58423e41e63ba66f7547521932a5e364 to your computer and use it in GitHub Desktop.
Save truongnmt/58423e41e63ba66f7547521932a5e364 to your computer and use it in GitHub Desktop.
serialize_from_session
def serialize_from_session(key, salt)
record = to_adapter.get(key)
record if record && record.authenticatable_salt == salt
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment