TODO: Write a gem description
Add this line to your application's Gemfile:
gem 'pretty_slugs'
And then execute:
$ bundle
Or install it yourself as:
$ gem install pretty_slugs
to add the migration(s) to your app, run
$ rails g pretty_slugs
then run
$ rake db:migrate
To your models that need to implement pretty slugs, add this line:
include PrettySlugs
And that is all you need if your model has a :name column, if you want to override the slug via a form field, then you can create a field named :slug in the model's form
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request