emk / mephisto forked from technoweenie/mephisto

User-friendly blogging with multisite support and asset managment

This URL has Read+Write access

mephisto / vendor / plugins / permalink_fu
name age message
..
file README Loading commit data...
file init.rb
directory lib/
directory test/
vendor/plugins/permalink_fu/README
PermalinkFu

This is a simple plugin extracted from Mephisto for creating permalinks from attributes.

  class Article < ActiveRecord::Base
    has_permalink :title
  end

This will escape the title, making it fit to use in a URL in the after_validation callback.

Use PermalinkFu.escape to escape a string manually if you like.