-
-
Notifications
You must be signed in to change notification settings - Fork 592
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
:history fails when trying to reuse slugs #1009
Comments
Here's a concern implementing b) https://github.com/sinfin/folio/blob/master/test/models/concerns/folio/friendly_id/history_test.rb
and a simple test showcasing the fix https://github.com/sinfin/folio/blob/master/test/models/concerns/folio/friendly_id/history_test.rb
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Steps to reproduce:
a
of a Model with slugfoo
a
tobar
b
of a Model with slugfoo
ActiveRecord::RecordNotUnique
exceptionWays to fix:
a) validate the slug respecting
friendly_id_slugs
tableb) preferred - remove the old slug if it's not the current one and make the instance
b
invalid via validating if it isThe text was updated successfully, but these errors were encountered: