I am writing a rails 3.1 program that allows a user to 'share' a picture with other people via email. A user clicks 'share this with person X', which then sends an email out to person X (who doesn't have to be registered with my app) with a link that will take them to the picture:
http://myapp.com/pictures/uuid
The person clicks the link, is taken to my app and sees the picture.
This makes me think that my DB schema should have a Pictures table that has a UUID as a primary key, but I have not seen this done in Rails before (always autoincrement ints). I don't think autoincrements will work here because it would be too easy for people to guess arbitrary url's and get to other peoples' pictures.
What is the best way to handle this in rails?