Steps to reproduce:
- create an instance
a of a Model with slug foo
- change slug of
a to bar
- try to create an instance
b of a Model with slug foo
- you'll get an
ActiveRecord::RecordNotUnique exception
Ways to fix:
a) validate the slug respecting friendly_id_slugs table
b) preferred - remove the old slug if it's not the current one and make the instance b invalid via validating if it is
Steps to reproduce:
aof a Model with slugfooatobarbof a Model with slugfooActiveRecord::RecordNotUniqueexceptionWays to fix:
a) validate the slug respecting
friendly_id_slugstableb) preferred - remove the old slug if it's not the current one and make the instance
binvalid via validating if it is