From: Dave Jones Date: 2013-01-07T11:15:28+09:00 Subject: Re: any gems to generate words synced with unique IDs I would look at the linguistics gem. Dave Sent from my iPhone On Jan 6, 2013, at 4:15 PM, Grary Stimon wrote: > Hi, > > I'm looking for a neat way to generate humanized names for records > associated with a RESTful HTTP resources given the following: > > 1) the child records are currently uniquely id'd by dbase-generated > 12-byte hexes (a la MongoDB), e.g., 50c4cee7f9034c0333000004 > > 2) the parent resource with which the children are associated has a > humanized name, but uniqueness is not enforced across parent names > (thus, this would appear a poor choice for a simple slugging approach) > > 3) what I'm hoping for is a way of humanizing the 12-byte strings with > word-number combinations, such that uniqueness is maintained at least > within the context of the parent resource, something that gives me > record id's like "monique23", "larry36", "panther99", etc. In other > words, I accept that, say, 'panther99' names more than one record, but > only in different parent resources (of course, this allowance could > become a bother when the resources have the same name and intent, e.g., > "lemonade stand"). > > Seems like PAAS Heroku has a strategy for something like the foregoing > to generate their wildcard DNS names. > > Any thoughts here? > > G > > -- > Posted via http://www.ruby-forum.com/. >