Giter Club home page Giter Club logo

is_taggable's Introduction

is_taggable

At last, a short and sweet tagging implementation that you can easily modify and extend.

Most of the plugins out there are on steroids or messing directly with SQL, a known gateway drug.

We wanted a more sober plugin that would handle new functionality without breaking a sweat. Some plugins had minimal or no tests gasp. They were so messed up that operating would likely cause internal bleeding.

So, we crafted the plugin we needed with the functionality we were looking for: tag kinds. It’s small and healthy. So, it should be a good base to build on.

Usage

After generating the migration:

$ script/rails 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 = " "

Get it

$ sudo gem install is_taggable

As a rails gem dependency:

config.gem 'is_taggable'

Or get the source from github:

$ git clone git://github.com/giraffesoft/is_taggable.git

(or fork it at github.com/giraffesoft/is_taggable)

Credits

is_taggable was created, and is maintained by Daniel Haran and James Golick.

License

is_taggable is available under the MIT License

is_taggable's People

Contributors

augustl avatar bikerduweb avatar gdagley avatar gnugeek avatar jamesgolick avatar myobie avatar rrouse avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.