A tiny, secure URL-friendly unique string ID generator.
Ruby implementation of original NanoID https://github.com/ai/nanoid
Into Gemfile / gems.rb add:
gem 'nanoid'
Size: 21 character length
Alphabet: _~0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
require 'nanoid'
Nanoid.generate
require 'nanoid'
Nanoid.generate(size: 10)
require 'nanoid'
Nanoid.generate(alphabet: '1234567890abcdef')
require 'nanoid'
Nanoid.generate(size: 14, alphabet: '1234567890abcdef')