I am using friendly_id 4.0.10.1 gem for generating slug. I am using two columns to generate slug: first_name and last_name.
The last_name value can be empty. The problem arises in these cases:
first_name last_name slug
1. Arun Kumar arun-kumar
2. Arun Kumar arun-kumar--2
3. Arun Kumar arun-kumar--3
I am expecting the slug to be like this: arun-kumar-2, arun-kumar-3.
I do not want those double hyphens to appear at the end. How to avoid that?
See this issue, and the linked docs:
https://github.com/norman/friendly_id/issues/170
You can configure
sequence_separator
.