For a personal project I'm working on, I'd like to generate ids for objects on my website in the same style as sites like bit.ly and twitpic. Sending users to example.com/4gwv9k
would let me get the item with id 9gwv9k
. Is this simply a question of auto-incrementing on a base-36 scheme or is there some underlying, non-incrementing magic going on?
This is all being done in Rails, so any gem support would be welcome as well.
Here's an example on I did it in Sinatra.
https://github.com/chrisledet/shorty_url