Forum: Ruby on Rails Removing tags with acts_as_taggable plugin?

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.
59ea1b450935b9d70abfec4186b7a4d5?d=identicon&s=25 Jeff Coleman (progressions)
on 2007-01-26 03:28
I'm adapting the acts_as_taggable plugin and it strikes me as odd that
nobody seems to have ever dealt with the fact that it doesn't include a
means to remove tags.  It's recommended in the Rails Recipes book and
I've seen other posters on the mailing list and Rails Wiki recommending
it, but hasn't anybody ever wanted to remove a tag?

I'm just learning more about polymorphic associations, so I'm sure it
will be clear once I understand them more, but for now I am having
trouble working out how to do a few things:

1. remove a specific tag from an object
2. determine if an object includes a tag named X
3. make sure all the tags on my object are unique, that it doesn't have
duplicated tag names

Any pointers?

65cf838378fb068035070ffe60c76e97?d=identicon&s=25 (Guest)
on 2007-01-26 09:26
(Received via mailing list)
1. haven't implemented that so I can't tell you
2. mytaggedobject.tags.find_by_name(tagiamlookingfor)
3. you'll have to add this yourself in acts_as_taggable.rb, using uniq
to filter the list passed in by the user should work I think.

Good Luck!

On Jan 25, 6:28 pm, Jeff Coleman <>
631d1677786f0725da6ccee46043686e?d=identicon&s=25 Jonathan Viney (Guest)
on 2007-01-26 13:48
(Received via mailing list)
My acts_as_taggable_on_steroids plugin may be of use. I added the
checking for tag names just today, what good timing ;).

This topic is locked and can not be replied to.