I'm currently working on a project where I need a generated unique identifier for an order and to not use the traditional database primary key of id. So instead of the traditional /orders/1 it would be something obscure like /orders/52312492.
The UUID gem's shortest id is 32 characters and seems a quite lengthy. My initial thought is to use Time.now.to_i.to_s + order.id for the identifier, which would yield something like "12403160401", but I was wondering if anyone had any better approaches? Thanks, Ryan --~--~---------~--~----~------------~-------~--~----~ SD Ruby mailing list [email protected] http://groups.google.com/group/sdruby -~----------~----~----~----~------~----~------~--~---
