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 8296757
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T15:08:34+00:00 2026-06-08T15:08:34+00:00

I am currently having some trouble with the Model.tag_counts_on() method in the acts_as_taggable_on plugin

  • 0

I am currently having some trouble with the Model.tag_counts_on() method in the acts_as_taggable_on plugin in Rails. I can’t find real documentation on the method and I want to know more about the parameters it accepts. I am trying to get tag counts on a subset of tags, not the whole set of tags on my application, how would I go about doing 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-08T15:08:37+00:00Added an answer on June 8, 2026 at 3:08 pm

    Assuming that you are using mbleigh/acts-as-taggable-on

    This is the master branch of the gem in which the method appears in.

    I would examine the conditions and on parameters.

    def tag_counts_on(context, options = {})
      all_tag_counts(options.merge({:on => context.to_s}))
    end
    
    ##
    # Calculate the tag counts for all tags.
    #
    # @param [Hash] options Options:
    # * :start_at   - Restrict the tags to those created after a certain time
    # * :end_at     - Restrict the tags to those created before a certain time
    # * :conditions - A piece of SQL conditions to add to the query
    # * :limit      - The maximum number of tags to return
    # * :order      - A piece of SQL to order by. Eg 'tags.count desc' or 'taggings.created_at desc'
    # * :at_least   - Exclude tags with a frequency less than the given value
    # * :at_most    - Exclude tags with a frequency greater than the given value
    # * :on         - Scope the find to only include a certain context
    def all_tag_counts(options = {})..end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently having some trouble with my shared hosting as I can't use sessions
I'm currently having some trouble with getting certain input fields passed along when a
I'm currently battling through some memory leaks and having some serious trouble working out
I am currently having trouble with a live wallpaper that does some very intensive
I'm currently having a problem with some Socket stuff. The output that I want
I am having some trouble mixing PHP with XML. I currently have a PHP
I having some trouble trying to figure out how to implement a Rails 3
I'm having some trouble deleting an item from a collection inside a model when
I'm having some trouble with transactions in Rails 3. Basically I have two models
I'm trying to write an app in rails 3 and I'm having some trouble

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.