Based on https://github.com/technoweenie/permalink_fu
class Article < ActiveRecord::Base
has_permalink attr_names, permalink_field, options
end:if:unless:unique-trueby default:scope- skipped when:uniqueis set to false:update-falseby default
Stores permalink form of title to the permalink attribute:
has_permalink :titleStores a permalink form of "#{category}-#{title}" to the permalink attribute:
has_permalink [:category, :title]Stores permalink form of category to the category_permalink attribute:
has_permalink :category, :category_permalinkExtend the scope within the parmalink should be unique:
has_permalink :title, :scope => :blog_idDon't care if permalink in not unique:
has_permalink :title, :unique => falseUpdate the permalink every time the attribute(s) change:
has_permalink :title, :update => true