Simple support for using slug-generating fields in Formtastic
Go to file
2013-02-13 08:02:27 -05:00
lib make slugs unique within the frontend 2013-02-13 08:02:27 -05: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'