-
-
Notifications
You must be signed in to change notification settings - Fork 588
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create Shorter Conflict Slugs and Recreate Slugs on Update #576
Comments
@harshamv This is how |
how can get a a fixed length of the hec value. also would like to read about the discussion and may have a valid point as well. did it happen on github discussion and can you share a link? |
@harshamv Don't understand your question. Please provide an example or test. As for your original question, this might work:
If any of your candidates are available, you'd still get the UUID-based conflict resolution functionality -- which is a good thing. Re the discussion, this library has years of experience around this particular problem. We can't recall every discussion, how it originated and got resolved. This is the actual commit that introduced the current UUID-based sequencing. There's even a brief explanation in the README file. Have you checked that already? |
Read me update with code for previously used numeric sequence Suggestion reference: norman#602 (comment) Code reference: norman#576 (comment)
If i have a conflicting slug it generates a very long slug as follows
Explore explore
Explore explore-7a8411ac-5af5-41a3-ab08-d32387679f2b
Is there a way i can just create 'explore-1', 'explore-2' etc.
Other option is i want to have a shorter slug generator like the following
candidates.first + friendly_id_config.sequence_separator + SecureRandom.hex(3)
How can i create a Initialization to allow this across all models?
Also how can i recreate the slug on updating a record in the model?
The text was updated successfully, but these errors were encountered: