Ruby on Rails
acts_as_slugable

Generates URL slugs (permalinks) based on a specified field.

Generates a URL slug based on a specific fields (i.e. title).

The slug is generated on save and create actions.

Usage

Generate a URL slug based on the title of a Page record and store it in url_slug. Slug will be unique within the parent_id.

class Page < ActiveRecord::Base
    acts_as_slugable :source_column => :title, :target_column => :url_slug, :scope => :parent
end