Simple support for using slug-generating fields in Formtastic
Go to file
2013-04-03 06:59:46 -04:00
lib ensure slugs don't start or end with a dash 2013-04-03 06:59:46 -04:00
.gitignore initial commit 2012-12-14 17:40:17 -05:00
formtastic-slug.gemspec initial commit 2012-12-14 17:40:17 -05:00
Gemfile initial commit 2012-12-14 17:40:17 -05:00
LICENSE.txt initial commit 2012-12-14 17:40:17 -05:00
Rakefile initial commit 2012-12-14 17:40:17 -05:00
README.md initial commit 2012-12-14 17:40:17 -05:00

Add a slug field, that generates a slug based on another field.

= semantic_form_for @blog_entry do |f|
  = f.input :title
  = f.input :slug, :as => :slug, :based_on => :title

Just add it to your Gemfile:

gem 'formtastic-slug', :git => 'git://github.com/johnbintz/formtastic-slug.git'