Read more

Rails has a built-in slug generator

Henning Koch
April 08, 2015Software engineer at makandra GmbH

Today I learned that Ruby on Rails has shipped with a built-in slug generator Show archive.org snapshot since Rails 2.2:

> "What Up Dog".parameterize
=> "what-up-dog" 

> "foo/bar".parameterize
=> "foo-bar" 

> "äöüß".parameterize
=> "aouss" 
Illustration UI/UX Design

UI/UX Design by makandra brand

We make sure that your target audience has the best possible experience with your digital product. You get:

  • Design tailored to your audience
  • Proven processes customized to your needs
  • An expert team of experienced designers
Read more Show archive.org snapshot

Also see: Normalize characters in Ruby.

Posted by Henning Koch to makandra dev (2015-04-08 09:01)