mantas/acts_as_slugable
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
This is a slight modified copy of http://code.dunae.ca/acts_as_slugable/. It uses rails .parameterize instead of custom functions. Installation: ./script/plugin install git://github.com/mantas/acts_as_slugable.git Usage: === 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 == Credits Parameterizing changed to Rails' parameterize by Mantas Masalskis (http://idev.lt), 2009 July Created by Alex Dunae (http://dunae.ca/), 2006-07, though it takes a village to raise a plugin: Thanks to Andrew White (http://pixeltrix.co.uk/) for fixing a conflict with <tt>acts_as_list</tt>. Thanks to Philip Hallstrom (http://pjkh.com/) for pointing out some redundant code.