Vaishal Sheth
2006-Mar-28 21:14 UTC
[Rails] acts_as_taggable plugin to tag multiple fields in a model
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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060328/2437ea8a/attachment-0001.html
Jim Kane
2006-Apr-21 13:47 UTC
[Rails] acts_as_taggable plugin to tag multiple fields in a model
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 Kane http://jim.eponym.com/ fastjames@gmail.com On Mar 28, 2006, at 2:23 PM, Vaishal Sheth wrote:> 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 > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060421/d39b9ee1/attachment.html
Seemingly Similar Threads
- has_many & belongs_to with Plugins (login_engine)
- Record retrieval in Many-to-many using :through not working
- Doing and storing a Writeboard like diff in RoR
- Why am I getting "undefined local variable or method `acts_as_taggable''"?
- acts_as_taggable clouds?