1
0
mirror of https://github.com/danbee/slugtastic synced 2025-03-04 08:49:05 +00:00
Go to file
2011-10-04 16:22:59 +01:00
lib Initial commit. 2011-10-04 15:39:51 +01:00
Manifest Added better description. 2011-10-04 16:22:59 +01:00
Rakefile Added better description. 2011-10-04 16:22:59 +01:00
README.md Added README file content. 2011-10-04 15:53:13 +01:00
slugtastic.gemspec Added better description. 2011-10-04 16:22:59 +01:00

Slugtastic

Simple gem for autogenerating permalink style slugs for your ActiveRecord models.

Install

Add this to your Gemfile:

gem "slugtastic"

And run bundle install

Usage

Usage is very simple. Just add the following to your model:

has_slug :slug, :from => :title

This will generate a slug string from the title atrribute and store it in the slug attribute unless the slug already contains a string. The slug is generated pre-validation so you can still use validates_presence_of :slug.

There are no extra options at present.