Add Permalinks to Ruby on Rails Sites for Search Engine Friendly URLs

Posted by Trey Connell on January 19, 2009

While building the movie site in my spare time, I came across the need to implement permalinks for the different types of content – users, movies, reviews, etc.  I want the site to have clean, search engine friendly URLs.  After search around, I found a nifty plugin called permalink_fu.

This rails plugin allows you to specify any field in a model that a permalink should be created from and then store that value in a new column. For example, in my Movie model, I specified that the permalink would be created from the title field and stored in the permalink column. You can then modify your routing appropriately to use the new permalinks.

For information on how to install and use this plugin, read this article on seoonrails.com.

Trackbacks

Use this link to trackback from your own site.

Comments

Leave a response

Comments

CommentLuv Enabled