Generate secure token for ActiveRecord models