Extends ruby "String" class with "urlize" method which converts string to friendly url. It removes all characters that couldn't be used in url and replaces spaces/underscores with dashes. In addition it transliterate string using I18n library.
Gemfile gem 'string-urlize', '~> 1.0.2'
install gem install string-urlize