Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7859837
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T22:03:05+00:00 2026-06-02T22:03:05+00:00

I’m using acts_as_taggable_on, but now have a new requirement: The end goal: Users should

  • 0

I’m using acts_as_taggable_on, but now have a new requirement:

The end goal: Users should be able to agree with the tag choice another user has made, making the tagging more credible / reliable.

I see two ways to do this:

1) One way to do this would be to let an object be tagged more than once with the same tag (ie, tag_id doesn’t need to be unique within the tagging context).

I know how to remove the validation in tagging.rb, but how do I change the code to let multiple users tag an object with the same tag? Is it as simple as removing the validation?

2.) Another way would be to make taggings voteable using thumbs_up, so users can upvote / downvote the tagging decision.

Both of these seem weak, so I’m leaning towards rolling my own tagging solution, but I’d rather DRY – so, any insights into which method is best, or am I missing some easy way to do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T22:03:06+00:00Added an answer on June 2, 2026 at 10:03 pm

    The acts_as_taggable_on gem supports this use case, actually. The key is using the tag ownership features:

    @owner_a.tag(@taggable_object, :with => "list,of,tags", :on => :taggable_attribute)
    @owner_b.tag(@taggable_object, :with => "list,of,neat,tags", :on => :taggable_attribute)
    
    @taggable_object.taggable_attribute(@some_user, :locations) # => [#<ActsAsTaggableOn::Tag id: 1, name: "list">...]
    

    This will give you a list of all tags, including duplicate tags from unique owners, effectively allowing each user to tag an object with a specific tag one time.

    I use the following to convert that list to a hash of unique tags with a count for each tag:

    @taggable_object.taggable_attribute.inject(Hash.new(0)) {|h,i| h[i.name] += 1; h } # => { "list" => 2, ... "neat" => 1 }
    

    I use this to see which tags the user has already applied to the object, which lets me determine with to show a down/upvote icon:

    @taggable_object.owner_tags_on(@owner_1, :taggable_attribute); # => [#<ActsAsTaggableOn::Tag id: 1, name: "list">...]
    

    Remember that acts as taggable on always overwrites the previous tag list when using the ownership feature, so adding another @owner_a.tag(:taggable_object, :with => "new,tags"...) would erase the previously tagged items on the @taggable_object.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I want use html5's new tag to play a wav file (currently only supported
I have a French site that I want to parse, but am running into
I have thousands of HTML files to process using Groovy/Java and I need to
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.