sfaxon/slugger — pull request #1 by jordanbyron (2012-01-10 15:51:20+00:00)
Title: Code cleanup and replace class_inheritable_accessor

Hey Seth,

Thanks for writing this gem. I found most of the other slug generating gems out there are either unmaintained or overkill for my needs. Slugger did almost everything I needed it to do, and nothing more. I did however run into a few problems using this with Rails 3.1+, as `class_inheritable_accessor` is deprecated and removed from Rails 3.1

So one commit fixes that, and the other includes some very small code style changes: Wrapping to 80 characters per column, replacing `#send` where we don't need to use it, etc.

I also have two more pull requests which I will send over. One adds a `max_length` param which will limit the length of the generated slug. The other adds a new conflict resolution method by appending the database ID to slugs which conflict. I had to do some hand-wavy stuff to get that working, so you can make a judgement call if you want to merge it.

The reason I've submitted this one first is that the others built on top of the cleanup I did here. So if you don't like this patch then we probably won't be able to easily merge in those other features :flushed:

Let me know if there is anything here you'd like to see changed. And again thanks for releasing this project!

Jordan