Categories: None [Edit]
e9_tags
== E9Tags
An extension to ActsAsTaggableOn[http://github.com/mbleigh/acts-as-taggable-on] which "improves" on custom tagging, or at least makes it more dynamic. Additionally it
provides some autocomplete rack apps and the corresponding javascript.
== Installation
1. E9Tags requires jquery and jquery-ui for the autocompletion and tag-adding form, be sure they're loaded in your
pages where the tags form will be rendered.
2. E9Tags extends ActsAsTaggableOn and requires it. Run it's generator if you have not.
3. Run the E9Tags install script to copy over the required JS
rails g e9_tags:install
4. Then make sure it is loaded, how you do that doesn't matter, e.g.
<%= javascript_include_tag 'e9_tags' %>
5. Create an initializer for that sets up the taggable models and their controllers. This gives the models the tag
associations and methods and prepares their controller to handle the otherwise unexpected tag params.
require 'e9_tags'
require 'contacts_controller'
require 'contact'
E9Tags.controllers << ContactsController
E9Tags.models << Contact
OR
You can just include the modules in your classes yourself. The first way really exists for the case where the
classes you wish to extend are part of another plugin/gem.
# in contact.rb
include E9Tags:Model
# in contacts_controller.rb
include E9Tags::Controller
6. Render the tags form partial in whatever model forms require it.
= render 'e9_tags/form', :f => f
If you pass a context, it will be locked and no longer possible to change/add the contexts on the form (and as
a side effect, the tags autocompletion will be restricted to that context).
= render 'e9_tags/form', :f => f, :context => :users
Finally if you pass a 2nd arg to :context you can set a tag context to be "private" (default is false). In this
case the tag context will be locked as private (typically suffixed with *), meaning that the tags wil...
Total
Ranking: 37,086 of 180,661
Downloads: 28,400
Daily
Ranking: 21,780 of 180,641
Downloads: 12
Downloads Trends
Ranking Trends
Num of Versions Trends
Popular Versions (Major)
Popular Versions (Major.Minor)
Depended by
Rank | Downloads | Name |
---|
Depends on
Rank | Downloads | Name |
---|---|---|
42 | 517,970,671 | rails |
721 | 52,543,428 | acts-as-taggable-on |
Owners
# | Gravatar | Handle |
---|---|---|
1 | travis_e9 |