Pretty URLs with dashes in Ruby on Rails
November 18, 2009 • Ruby on Rails • Comments
Routes in Rails are great. No doubt!
Anyways, it fails at URLs like “category/articleid-a-few-words-headline-stub.html” etc. if you try the following:
1 | map.article '/:article-:stub.html', :controller=>'article', :action=>'show' |
therefore here a quick workaround to get nice dashes in routes with article-id and so on.. [More]