29th / personnel-v3

Personnel management system version 3
https://www.29th.org
2 stars 6 forks source link

Use member name in URL of profile link #115

Closed wilson29thid closed 2 years ago

wilson29thid commented 2 years ago

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.