Curated list of episodes, bundled to help you on your learning path!
Videos of tech, infrastructure, hardware and software which non-instructional by nature.
Articles around software and tutorials.
Show your love and support while looking fancy.
Got a question or want to chat about a topic? Let's talk!
before_update :generate_slug, if: :title_changed?
So after a little digging I found this simple fix that checks if the title field has been changed and only runs the generate_slug function if it has. basically you just need to append "if: <some_field>_changed?" to any field you want to check. This now allows for duplicate titles that have UUID's to keep their original UUID when updating unless the title has explicitly been changed to a new title, the UUID might be deleted if it no longer is a duplicate or a new UUID is generated only if it is a duplicate of a different title.