From 1d6662f8661a0b316d937be808c972f0a4b408b2 Mon Sep 17 00:00:00 2001 From: Dan Barber Date: Tue, 4 Oct 2011 15:53:13 +0100 Subject: [PATCH] Added README file content. --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index e69de29..46d4ecb 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,22 @@ +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. \ No newline at end of file