1
0
mirror of https://github.com/danbee/slugtastic synced 2025-03-04 08:49:05 +00:00
Go to file
2012-08-18 16:02:55 +01:00
lib Added basic transliteration with IConv. 2012-08-18 16:02:55 +01:00
spec Added basic transliteration with IConv. 2012-08-18 16:02:55 +01:00
.gitignore Fixed final test. Added .gitignore file. 2012-08-18 08:44:01 +01:00
.rspec Added .rspec file. 2012-08-17 19:35:28 +01:00
.travis.yml Added Travis-ci config file. 2012-08-18 09:25:42 +01:00
CHANGELOG.md Added changelog. Updated version to v0.2.0 ready for release. 2012-08-18 10:53:30 +01:00
Gemfile Gem rewrite with spec. There's one test left to get passing. 2012-08-17 19:34:33 +01:00
Gemfile.lock Added 'rake' as a development dependency. 2012-08-18 09:33:10 +01:00
LICENSE Gem rewrite with spec. There's one test left to get passing. 2012-08-17 19:34:33 +01:00
Rakefile Gem rewrite with spec. There's one test left to get passing. 2012-08-17 19:34:33 +01:00
README.md Added Travis-ci build status to readme. 2012-08-18 09:31:25 +01:00
slugtastic.gemspec Added 'rake' as a development dependency. 2012-08-18 09:33:10 +01:00

Slugtastic Build Status

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

Installation

Add this line to your application's Gemfile:

gem 'slugtastic'

And then execute:

$ bundle

Or install it yourself as:

$ gem install slugtastic

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.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request