Acts As Slugable plugin
Plugin details
Documentation
Install the plugin:
ruby script/plugin install http://code.dunae.ca/acts_as_slugable/
Usage examples
================
In your target table, add a column to hold the URL slug.
With scope
----------------
class Page < ActiveRecord::Base acts_as_slugable :source_column => :title, :target_column => :url_slug, :scope => :parent end
Without scope
-----------------
class Post < ActiveRecord::Base acts_as_slugable :source_column => :title, :target_column => :url_slug end
A sample link
--------------
link_to @page.title, :action => 'show', :url_slug => @page.url_slug
Further Documentation
There is currently no advanced documentation for this plugin.
New documentationEdit plugin | (0 older versions) | Last edited by: hardway, 9 months ago

