Forum: Ruby on Rails acts_as_taggable plugin to tag multiple fields in a model

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Vaishal S. (Guest)
on 2006-03-29 00:36
(Received via mailing list)
Hello,

Is it possible to tag multiple fields in a model using either
acts_as_taggable plugin or gem?  If it is not possible out of the box,
can
anyone provide pointers on how I would achieve something like that?

Say I have a 'Food' model which has 'spices'  and 'healthiness'
attributes.
I want to be able to tag on both those fields.  Is that possible?

Thanks,
Vaishal
Jim K. (Guest)
on 2006-04-21 17:49
(Received via mailing list)
In case no one replied...

The acts_as_taggable plugin (the one originally written by DHH)
allows you to tag on any field that's declared as taggable, and it
uses a single set of tables for the Tags and Taggings.  However, it
does require Rails 1.1 as it uses :through to achieve this magic.

The acts_as_taggable gem uses a separate table to hold the tags for
each model you're tagging (so you can't share the vocabulary among
models).  I believe it works with Rails 1.0.

I chose the plugin because I knew I wanted a shared vocabulary.  YMMV.

---
Jim K.
http://jim.eponym.com/
removed_email_address@domain.invalid
This topic is locked and can not be replied to.