aq1018/dm-is-slug — pull request #9 by dantler (2013-09-11 02:18:58+00:00)
Title: Slug will not be regenerated when owner object is updated

I encountered a scenario where updating my class would cause the slug to be regenerated. This became very painful when I had two identical slugs who were both being updated frequently, as each new slug would be generated with a bigger number-suffix ("slug-2" would become "slug-3" and so forth).

My fix is to change the circumstances in which a slug might be regenerated by altering the "#stale_slug?" method. I've added a spec test defining the bug I am trying to fix. "should not increment slug number when update doesn't affect slug generation." Using the old code for the #stale_slug? method, this test will fail.