CakePHP: Working sluggable behavior

Here’s a nice little freebie from the Synodic Solutions code scraps. There’s a great sluggable behavior originaly written by Mariano Iglesias, but since it was created, the syntax for LIKE and NOT statements has changed in cakephp, which broke the behaviors ability to generate unique slugs when the slug already existed in the database. This is a fixed version of that sluggable behavior for your downloading pleasure!
Downloadsluggable.php16KB