Instead of /users/123/service-record it should be /users/sgt-cyr-123/service-record. I'm sure there's a gem for this out there (edit: indeed, there's friendly_id). Just for aesthetics.
Options I can think of are:
/3-lt-col-wilson
/lt-col-wilson-3
/3/lt-col-wilson
But, since people get promoted (somewhat frequently for lower ranks, e.g. pvt to pfc), these urls will change. Is that a bad thing? We can make it ignore everything but the number (id), or friendly_id can store a history of the slugs so old ones continue to work. But is it bad for any other reason?
Some non-changing alternatives would be:
/timothy-wilson
/wilson (when there's a duplicate, friendly_id can append another field, like first name, prefix, id, etc.)
Another thing to consider is whether we want to use /users or /members. The former is what we've been using so far with v3, but the latter is what we used in v2, and what I'm increasingly leaning towards, as it feels a more appropriate match to our domain.
Instead of
/users/123/service-record
it should be/users/sgt-cyr-123/service-record
. I'm sure there's a gem for this out there (edit: indeed, there's friendly_id). Just for aesthetics.Options I can think of are:
But, since people get promoted (somewhat frequently for lower ranks, e.g. pvt to pfc), these urls will change. Is that a bad thing? We can make it ignore everything but the number (id), or friendly_id can store a history of the slugs so old ones continue to work. But is it bad for any other reason?
Some non-changing alternatives would be:
Another thing to consider is whether we want to use
/users
or/members
. The former is what we've been using so far with v3, but the latter is what we used in v2, and what I'm increasingly leaning towards, as it feels a more appropriate match to our domain.