You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Use slugs instead of ids in the wishlist urls #156
Right now, our wishlist urls look like this: /wishlists/1. URLs are part of the user interface and ids don't make for a great UI; let's make them more like this: /wishlists/dc-general!
The minimum requirements for this issue are:
URLs should be slug-based instead of id-based
The slug should be automatically generated based on the name
The slug should update if the wishlist name updates
@reneesandefur Awesome! It looks like you've gotten started, but here's an answer anyway: gems are fine as long as they're good quality and there's a reason to use them. 🙂
If you add a gem, it should have decent code quality, be tested, and (preferably) be pretty common. It should also be proportional to the problem: e.g. adding a giant state machine gem to avoid a small amount of hand-written code wouldn't be worth it.
For this issue, either method (custom made or friendly_id) would work, though I'd prefer custom; friendly_id looks a bit bloated for the task at hand.
Activity
reneesandefur commentedon Oct 22, 2017
I'd like to give this a shot!
reneesandefur commentedon Oct 22, 2017
@leesharma Does it matter if it is custom or uses a gem?
leesharma commentedon Oct 24, 2017
@reneesandefur Awesome! It looks like you've gotten started, but here's an answer anyway: gems are fine as long as they're good quality and there's a reason to use them. 🙂
If you add a gem, it should have decent code quality, be tested, and (preferably) be pretty common. It should also be proportional to the problem: e.g. adding a giant state machine gem to avoid a small amount of hand-written code wouldn't be worth it.
For this issue, either method (custom made or
friendly_id) would work, though I'd prefer custom;friendly_idlooks a bit bloated for the task at hand.