Questions tagged [acts-as-taggable-on]

ActsAsTaggableOn is a Ruby on Rails gem for handling generic tagging.

ActsAsTaggableOn is a Ruby gem for Rails that handles associating records with arbitrary tags. It handles complex tag relationships, searching and allows you to categorize your tags (for example, as skills, movies, or whatever you want).

520 questions
3
votes
2 answers

weird behavior with acts_as_taggable_on

Edit The instructions on Github instruct you to use the gemcutter source for the gem. Currently, this installs version 2.0.5 which includes the bug I've detailed below. @Vlad Zloteanu demonstrates that 1.0.5 does not include the bug. I have also…
maček
  • 76,434
  • 37
  • 167
  • 198
3
votes
1 answer

Sorting through association using acts-as-taggable-on gem

I am trying to dynamically sort a table of Posts by :type using acts-as-taggable-on gem. Let's say my Post object has 3 columns: user, title and date. I can easily sort a table of Post by putting in my controller @entries = Post.order(sort_column +…
Liyali
  • 5,643
  • 2
  • 26
  • 40
3
votes
1 answer

How to set minimum and maximum number of tags?

I am using acts-as-taggable-on gem and I am trying to make some sort of the validation on number of tags. I followed this tutorial and it works fine: http://railscasts.com/episodes/382-tagging I have an article which acts as taggable. For now I…
Cristiano
  • 3,099
  • 10
  • 45
  • 67
3
votes
3 answers

Rails acts_as_taggable heroku 500 error

I've created a new Projects model for my application and everything works fine in development but in production on Heroku I receive a 500 error. The error is coming from my ProjectsController#create the error states: 2014-05-16T07:00:48.018827+00:00…
iamdhunt
  • 443
  • 6
  • 16
3
votes
3 answers

Can't seem to get Acts-As-Taggable to work with Rails 4 (field won't update)

Seeing as the documentation for this gem is absolutely useless for beginners like myself (they the docs it doesn't say which code needs to go in which file), I figured I might get some better help here for my Rails 4 app instead of the official…
imjp
  • 6,495
  • 10
  • 48
  • 58
3
votes
2 answers

tagged_with always show me an empty array (acts-as-taggable-on)

Im using acts-as-taggable-on (3.0.1) and I tried some code on console: irb(main):005:0* Noticia.last.tags => [#] irb(main):006:0> Noticia.tagged_with("oil") => [] I noticed that my second query dont add…
Osny Netto
  • 562
  • 3
  • 9
  • 28
3
votes
1 answer

Union of two ActiveRecord::Relations

I'm implementing a searchable database whereby I have a Tool model that is taggable via the acts as taggable gem. It also has a class method that allows me to search on the name property of the tool: class Tool < ActiveRecord::Base …
Mike
  • 35
  • 5
3
votes
2 answers

acts_as_taggable with strong parameters in rails 4

How can I use acts_as_taggable_on gem with strong parameters in rails 4? Have: class User < ActiveRecord::Base acts_as_tagger end class Post < ActiveRecord::Base acts_as_taggable end @post = current_user.tag(@post, :with => :tag_list) def…
3
votes
1 answer

how override attr_accessible role ActsAsTaggableOn::Tag model?

how override attr_accessible role for field :name in Tag model in ActsAsTaggableOn gem ? I want some things like that in Tag model ... attr_accessible :name, :as => [:default, :admin] for allow me to edit field name of tag by admin role
3
votes
1 answer

Allow acts_as_taggable_on to work with hash tags

I am using the acts_as_taggable_on gem: https://github.com/mbleigh/acts-as-taggable-on This gem accepts user input for tags as comma separated i.e., Clever, Cool, Joyful I have a partial: shared/_micropost_form that asks for tags: <%=…
APJ
  • 245
  • 1
  • 3
  • 14
3
votes
1 answer

Using acts-as-taggable-on how do I find the top, say 10, tags in my app?

Basically, I want to sort all the tags by the number of taggings they have. I am trying to create navigation using the tags. So I want to display just the top 5, 10, 15, X tags sorted by the number of items they have tagged. So I can't do any…
marcamillion
  • 32,933
  • 55
  • 189
  • 380
3
votes
0 answers

Submit Select2 Form in Rails via Javascript with Acts-as-taggable-on

I have a tags list I'm showing on a page when the user visiting the page is the owner. I would like this individual to be able to adjust the tags to a photo directly on the page. As tags are added, it would update the Acts-as-taggable on field…
3
votes
1 answer

How to build tag hierarchy on rails using acts-as-taggable-on

I have a rails app that includes tagging for blog posts using the gem acts-as-taggable-on. My idea is to extend the tagging mechanism of this gem using a moderate-link approach where I can choose to create a few users as tag owners and they can…
Donny
  • 678
  • 11
  • 34
3
votes
2 answers

optimize the query using acts-as-taggable-on rubygem

I am using acts-as-taggable-on gem on my project. However, it takes about 80s to load all the tags. I have added eager loading in the run_controller, but it is not working. Here is the piece of code: def index @runs =…
3
votes
1 answer

Getting a list of tag counts for a specific Owner using acts_as_taggable_on

I have a User that is the owner for a set of Posts. I want to get a set of tag counts for the Posts that the user has tagged, but the method doesn't seem to be available. I'd like something like: @user.tag_counts_on(:context) akin to…
beeudoublez
  • 1,222
  • 1
  • 12
  • 27