smarter character replacement using ruby gsub and regexp
- by agriciuc
Hi guys!
I'm trying to create permalink like behavior for some article titles and i don't want to add a new db field for permalink. So i decided to write a helper that will convert my article title from:
"O "focoasa" a pornit cruciada, împotriva barbatilor zgârciti" to
"o-focoasa-a-pornit-cruciada-impotriva-barbatilor-zgarciti".
While i…