Browse the Ruby on Rails Community.

You are here: Browse Railsplugins Permalink Fu

Permalink Fu

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.

NOTE: This description has been extracted from the Plugin README and so the formatting may need updating to make browser friendly