Is Taggable plugin

Plugin details

Tagging that doesn't want to be on steroids. It's skinny and happy to stay that way

Websitehttp://github.com/leethal/is_taggable Repositorygit://github.com/leethal/is_taggable.git Author August Lilleaas Tags tag LicenseMIT

Documentation

Install the plugin:
ruby script/plugin install git://github.com/leethal/is_taggable.git

After generating the migration:

  $ script/generate is_taggable_migration
  $ rake db:migrate


All you need is the ‘is_taggable’ declaration in your models:

  class User < ActiveRecord::Base
    is_taggable :tags, :languages
  end


In your forms, add a text fields for "tag_list" and/or "language_list" (matching the example model above):

  <%= f.text_field :tag_list %>


Calling is_taggable with any arguments defaults to a tag_list. Instantiating our polyglot user is easy:

  User.new :tag_list => "rails, giraffesoft", :language_list => "english, french, spanish, latin, esperanto, tlhIngan Hol"


A comma is the default tag separator, but this can be easily changed:

  IsTaggable::TagList.delimiter = " "


A rake task, is_taggable:delete_orphans, will delete all the tags with zero taggings.

  rake is_taggable:delete_orphans

Further Documentation

There is currently no advanced documentation for this plugin.

New documentation

Edit plugin | (0 older versions) | Last edited by: hardway, about 1 year ago