use parameterize to convert the string

this is more efficient, and works on more cases. parameterize was introduced in rails 2.3.2