Easiest Permalink/PrettyURLs on Rails

This is the simplest way I’ve found to get pretty permalinks and/or URLs for this blog (for SEO optimization): use a 37signals-like standard prefix the id of the post to the prettyfied version of the title of the blog. Use the following to Find the post:


def self.find_by_permalink(permalink)
  return(nil) unless permalink


Use the following to build the permalink:


def permalink