NoobOnRails

Ruby on Rails tips, tricks and hints for the aspiring rails hero.



Tuesday, August 29, 2006

Adding user support to the acts_as_taggable plugin


I was going to write this huge post on how to do this but it looks like I don't need to. SlashDotDash has a post up on how to add user support to acts_as_taggable and it looks mighty fine to me so instead of duplicating efforts...go here! The problem with this is that when a user edits the tags, they could potentially delete all of the tags for that item. I could work on a fix for this unless someone else has one they can post?

1 Comments:

  • At 9:12 PM, Anonymous Anonymous said…

    Here is my modification, for acts_as_taggable with user-specific deletion:

    Just change the line that is the culprit: taggings.destroy_all

    to the following:
    Tagging.destroy_all(" taggable_id = #{self.id} and user_id = #{user.id} ")

     

Post a Comment

<< Home