Friendly URLs in Ruby on Rails
A quick and easy way to add friendly url's in ruby on rails
in the Model put :
1 def to_param 2 id.to_s+'-'+title.downcase.gsub(' ', '-') 3 end 4 # note - title to be replaced with relevant column name
so now instead of :
http://www.savantis.co.uk/savantis/blog_article/19
you would get :
www.savantis.co.uk/savantis/blog_article/19-friendly-urls-in-ruby-on-rails

