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
3 answers

In ruby on rails, how to group records by tag when records have multiple tags

I'm using Rails 3.0 and the acts_as_taggable_on gem. I have a Candy model and candies can have multiple tags for flavors. Let's say Candy1.tags #['apple', 'orange'] Candy2.tags #['orange', 'banana'] Candy3.tags #['apple', 'kiwi'] I want a list of…
Steve Grossi
  • 2,765
  • 1
  • 22
  • 26
3
votes
1 answer

Using jquery tokeninput and acts_as_taggable_on

I've implemented the framework outlined in this post: How to use jquery-Tokeninput and Acts-as-taggable-on with some difficulty. This is working insofar as prepopulating with the appropriate theme and ajax search, but when I enter a new tag, it is…
panzhuli
  • 2,890
  • 6
  • 33
  • 46
3
votes
1 answer

Can I validate the presence of acts_as_taggable_on tags?

Yea I have a model with acts_as_taggable_on :styles, my styles taggings are passed in from an array of check boxes: <% styles.each do |style|%> <%= check_box("tattoo", "style_list", {:multiple => true}, style, nil) %> <%=…
rugbert
  • 11,603
  • 9
  • 39
  • 68
3
votes
1 answer

Rails tagging gem that supports tagging a model with other models?

Most Rails tagging gems support tagging an object with arbitrary strings. (In addition to this) I'd like to tag an object with other objects. Imagine I am building a Q&A site for Dog Lovers: I want a person to be able to ask a question. The person…
3
votes
1 answer

acts_as_taggable_on Version 9.0 PG::DuplicateTable: ERROR: relation "index_taggings_on_tag_id" already exists

I am running Rails 7.0.0 and Ruby 3.0.3 with gem 'acts-as-taggable-on', '~> 9.0'. With this setup and a fresh, new rails app installation, I am receiving the errors noted below after running rails db:migrate. name@iMac project % rails db:migrate ==…
3
votes
1 answer

Acts_as_taggable_on migration fail

I'm using Rails 3.0.6/Ruby 1.8.7 and I've been trying to get the acts_as_taggable_on (2.0.6) gem to work but it seems to fail on the default migration. Log: == ActsAsTaggableOnMigration: migrating ====================================== --…
vanzi
  • 33
  • 1
  • 5
3
votes
1 answer

How to search by context using acts-as-taggable-on

I'm having trouble understanding how the "tagged_with" method would work in the case where I wanted to search "by context". For example, if I have the following @user: class User < ActiveRecord::Base acts_as_taggable_on :skills, :interests …
Dominic
  • 341
  • 2
  • 5
  • 15
3
votes
2 answers

search models tagged_with OR title like (with acts_as_taggable_on)

I'm doing a search on a model using a scope. This is being accessed by a search form with the search parameter q. Currently I have the code below which works fine for searches on tags associated with the model. But I would also like to search the…
robzolkos
  • 2,196
  • 3
  • 30
  • 47
3
votes
1 answer

ActsAsTaggableOn Undefined Method '[]=' for nil:NilClass - Create Action

Thanks in advance for the help. Below, at the bottom of my post, I updated it with the fix for this issue, partly thanks to Narasimha Reddy. Hope it helps anyone with a similar issue after upgrading to Rails 5.2. UPDATE: ActsAsTaggableOn 6.0 is out…
3
votes
1 answer

acts_taggable_on not recording tagger_id or tagger_type

I have setup the acts-as-taggable-on gem on Rails 3.0.3 and Ruby 1.9.2. The tagging is working as expected but the taggings table is not capturing the tagger_id. Here is what I have setup: class Course < ActiveRecord::Base # attr_accessible…
davidheller
  • 323
  • 1
  • 2
  • 11
3
votes
1 answer

activeadmin and acts_as_taggable_on generates ambiguous_column_name error

I am using active_admin and acts_As_taggable_on and I am trying to make a filter. Here is the model code: class Person < ApplicationRecord acts_as_taggable_on :expertise, :industry end Here is the filter: filter :industry, as: :select,…
3
votes
1 answer

Adding a scope to ruby gem validation of uniqueness

acts-as-taggable-on gem has a built-in uniqueness validation: validates_uniqueness_of :name, if: :validates_name_uniqueness? def validates_name_uniqueness? true end How do I add a scope to this validation? I want to add scope: :user_id and don't…
3
votes
1 answer

Acts As Taggable On: translate tags

I'm working with RoR and I was wondering how can I translate Acts As Taggable On tags without having to manually insert it every time I use a tag again? Example: I have a Post (title and body in English) and I create it with tags "shoes, dress,…
pasine
  • 11,311
  • 10
  • 49
  • 81
3
votes
1 answer

Using paper_trail to reify acts_as_taggable_on associations

I'm working on a bug on a rails engine using both paper_trail and acts_as_taggable_on. When I rollback a deleted event the event details are restored, but the tags are not. Has anyone came across this same issue? Some relevant info:…
3
votes
2 answers

Ruby on Rails: How to delete unused tags with acts-as-taggable-on?

I've followed the instructions at https://github.com/mbleigh/acts-as-taggable-on/wiki, and in config/initializers/acts_as_taggable_on.rb i've put ActsAsTaggableOn.remove_unused_tags = true However it didn't work. I've also tried the following…