tokenize_attr adds a `tokenize` class macro to ActiveRecord models. When no prefix is needed it transparently delegates to Rails' built-in has_secure_token (Rails 5+). When a prefix is required it installs a before_create callback backed by SecureRandom.base58 with configurable size, prefix, and retry logic.

Required Ruby Version

>= 3.2.0

Authors

Pawel Niemczyk

Versions

  1. 0.2.0 March 08, 2026 (16 KB)
  2. 0.1.0 March 06, 2026 (13 KB)

Pushed by

SHA 256 checksum