Forum: Ruby on Rails acts_as_taggable - adding users and normalizing tags

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Parker T. (Guest)
on 2005-12-24 23:31
(Received via mailing list)
Hey all,

I'm wondering how people are using acts_as_taggable.  Two things I'd
like to do that aren't supported out of the box are tag normalization
and user attribution.  I can't imagine I'm the first to think about
doing this.

>From a schema perspective these things both seem simple, just put the
normalized tag in the tags table, and have a join table that contains
a user id and the denormalized version (i.e. tags -> "swat",
tags_to_XXX -> "S.W.A.T").

But, when I get to the coding part it gets a bit ugly.  Optimally I'd
like to:

  @thing.tag(user_input, :normalize => true, :user => @user)

where this causes the join table (tags_XXXX) to have its user_id fk
set, and populate a 'denormalized' field with "S.W.A.T" so that I can
display whatever the user typed on his/her pages.

Anybody got some code they want to share, or should I just start
hacking on taggable?


Parker T.
This topic is locked and can not be replied to.