Skip to content

Instantly share code, notes, and snippets.

@jgarber
Created April 10, 2012 09:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jgarber/2349973 to your computer and use it in GitHub Desktop.
Save jgarber/2349973 to your computer and use it in GitHub Desktop.
Spec for a tagging front-end Rails plugin or jQuery library

Need a Rails plugin that can also be used as just a jQuery library.

  • Written in CoffeeScript
  • Has Jasmine tests
  • Only requires jQuery — not jQuery UI
  • Based off of and styles itself after a single text form field
  • Can be downloaded with a minified JS version ready to go
  • Rails form helper for creating the field
  • SimpleForm detection and helper as well
  • Can specify separator characters like Tag-it
  • Autocomplete source can be an array or JSON path
  • Can return IDs instead of labels if in autocomplete-only mode with an association
  • Works well with acts_as_taggable_on or simple has_many association

Three modes:

  1. Free tags
  2. Autocomplete (from array or AJAX source)
  3. Autocomplete with new tag creation
@jgarber
Copy link
Author

jgarber commented Apr 10, 2012

TagField. A field full of flowers but with tags for heads.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment