How should I convert a post title to a slug in Ruby?
The title can have any characters, but I only want the slug to allow [a-z0-9-_]
(Should it allow any other characters?).
So basically:
- downcase all letters
- convert spaces to hyphens
- delete extraneous characters