I mainly use to_param as suggested by John Tolly.
Remember to put the indexes so that everything you use in to_param is quickly searchable, or you get a full table scan for each access. ( Not a performance enhancer!)
The quick work is to set the identifier somewhere out there, in which case ActiveRecord will ignore the rest of this file as cracks and just search by identifier. That's why you see a lot of Rails sites with URLs like http://example.com/someController/123-a-half-readable-title .
For more on this and other SEO observations from my experience with Rails, you can find this page on my website.
source share