Slugifier

Heavily-based on Keyvan Akbary’s PHP slugifier.

We use this at Chicisimo.

What's a slug?

Some systems define a slug as the part of a URL which identifies a page using human-readable keywords.

en.wikipedia.org/wiki/Semantic_URL#Slug

Usage

require "slugifier"

Slugifier.slugify("Here's to the crazy ones") # => here-s-to-the-crazy-ones