Search code examples
ruby-on-railsacts-as-taggable-on

Adding a new column to acts_as_taggable_on tag


Basically I would like to add the ability to vote on tags, so I would like to have a priority column for each different model's tag.

Any ideas about how to do this?

I suspect I need to make a new migration, but I don't know what to make it for. What would the migration be?

Thanks!


Solution

  • As I remember, acts_as_taggable creates a table called tags, so you add a field to that table:

    rails g migration add_votes_to_tag votes:integer
    

    and add your logic to vote on tag.

    P.S. Not sure if I understood correctly your question.