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
5
votes
6 answers

Creating fixture data for model using acts_as_taggable_on

I'm using the acts_as_taggable_on plugin to provide tagging for my Framework model. I've got the functional tests that Rails generates, as well as the fixtures it uses and I would like to expand them to add some tags so that I can test searching by…
Edward Dale
  • 29,597
  • 13
  • 90
  • 129
5
votes
2 answers

Weird behaviors on acts-as-taggable-on gem of not clearing taggings

I have a model called Recipe which uses the acts-as-taggable-on gem to add taggings to the recipes. The weird behavior is when I edit and update the recipe via the controller, the recipe taggings are added instead of updating to proper taggings.…
nayiaw
  • 1,416
  • 4
  • 17
  • 26
5
votes
2 answers

Simple form custom input with acts-as-taggable-on

I have some problems with Simple_form and acts-as-taggable-on. I have a object "Pictogram" with some tags like "door" and "emergency" I use this code in my form = f.input :tag_list When I edit my Pictogram the system delete my comma and display my…
5
votes
1 answer

acts_as_taggable_on and select2 returning weird results in Active Admin

So I have been playing around with acts_as_taggable_on in active admin, and for the most part everything is working as expected. However, whenever I search for tags, and add an existing tag to a model, it seems to save it as the ID, rather than as…
4
votes
2 answers

How to override lib/spree/search/base.rb

I need to override the get_products_conditions_for method in this class, what's the best way of doing this? I've tried adding this to an initializer: Spree::Search::Base.class_eval do def get_products_conditions_for(base_scope, query) …
4
votes
3 answers

Simple search using attribute, AND acts_as_taggable

I am building an app where I'd like to use a simple search to search through the object's title, AND tags (using acts_as_taggable_on) in one search I am able to construct either, but not both, and am at my wits end trying to figure it out. To…
4
votes
1 answer

with acts_as_taggable_on, how can I have a maximum number of tags?

with acts_as_taggable_on, how can I have a maximum number of tags?
Satchel
  • 16,414
  • 23
  • 106
  • 192
4
votes
1 answer

How can I input tags through a form (using acts_as_taggable_on) and Rails 3

Here is my form: 1 <%= semantic_form_for @vendor do |f| %> 2 <% f.inputs do %> 3 <%= f.input :name %> 4 <%= f.input :tag_list %> 5 <% end %> 6 <%= f.buttons %> 7 <% end %> Vendor.rb is…
Satchel
  • 16,414
  • 23
  • 106
  • 192
4
votes
1 answer

How to get *ALL* tags on an acts_as_taggable object regardless of its contexts

First things first. This is NOT a duplicate of Get all tags on taggable object - no matter context. I am looking for all tags on a specific model object. Not for all possible tags in my entire rails app. This is NOT a duplicate of Listing all tags…
Rakib
  • 12,376
  • 16
  • 77
  • 113
4
votes
2 answers

Uninitialized Tag constant in Rails 3 with Acts_As_Taggable_On

This controller action worked perfectly in Rails 2.3.x: def show @title = Tag.find(params[:id]).name @tag = Tag.find(params[:id]) @messages = Post.paginate(Post.find_tagged_with(@tag), :page => params[:page], :per_page => 10,…
4
votes
1 answer

Rails add two scope with active record result

I am using acts-as-taggable-on gem i use single field to search by tag_name and user_name User.rb class User < ActiveRecord::Base acts_as_taggable attr_accessor: :user_name, :age, :country, tag_list scope :tagged_with, lambda { |tag| { …
4
votes
1 answer

Set "acts-as-taggable-on" Taggings association to touch Taggable on save?

I am currently using the acts-as-taggable-on gem to add tags to my Pieces model. I am using elasticsearch to add an index of the tags to Pieces. However to update the index when a tagging is created I need to make the associations belongs_to…
Cu1ture
  • 1,273
  • 1
  • 14
  • 29
4
votes
2 answers

How to use multiple models for tag_cloud?

_tags.html.erb #Version 1 (Just lists out habits tags) <% tag_cloud Habit.tag_counts, %w{s m l} do |tag, css_class| %> <%= link_to tag.name, tag_path(tag.name), class: css_class %> <% end %> #Version 2 <% tag_cloud(@tags, %w(css1 css2 css3 css4))…
AnthonyGalli.com
  • 2,796
  • 5
  • 31
  • 80
4
votes
1 answer

allow duplicate taggings using acts-as-taggable-on

Rails newbie here! I am using acts-as-taggable-on to implement basic tagging, but I want to modify the default behaviour so that each instance of a model (say a post) can be tagged multiple times using the same tag. @post.tag_list.add("awesome,…
jellycola
  • 494
  • 1
  • 5
  • 12
4
votes
1 answer

Select multiple facets or filter data simultaneously

UPDATED 6/29/12 I have managed to set up a search and a side bar for filtering results of a search using Sunspot and act-as-taggable with Rails. I was following this tutorial here but I still can't select mutliple filter's at once. When I select a…
DaveG
  • 1,203
  • 1
  • 25
  • 45