I want to create a web app similar to http://www.pastebin.com/ in Ruby on Rails. pastebin.com uses a random string to identify an item. Ruby on Rails uses an auto-incrementing n
For vanilla ruby
require 'securerandom' require 'base64' slug = Base64.encode64(SecureRandom.uuid)[0..10] => "YWVkNzZmYjI" => "MzQxMDkxY2U"