Creating seo friendly url from a string

Viewed 5518

I am trying to create a URL friendly link from a string. Instead of example.com/Jessica Alba, I want example.com/jessica-alba. How do I get the link_to tags to link me to the seo friendly permalink?

I also need to make sure that the show method only displays the seo friendly permalink in the address bar and only accepts the seo friendly permalink.

3 Answers
Related