Questions tagged [acts-as-taggable]

60 questions
29
votes
3 answers

How to add tagging with autocomplete to an existing model in Rails?

I'm trying to add "tags" to an Article model in a Rails 3 application. I'm wondering if there is a gem or plugin that has adds both the "tagging" functionality in the model and also the auto-complete helpers for the views. I've found…
deb
  • 12,326
  • 21
  • 67
  • 86
8
votes
3 answers

How can I delete the tag from the tag list of the act_as_taggable plugin?

I have tried to destroy tags from the given code but it's not working. How can it be accomplished? @tag = Tag.find_by_name(params[:name]) @tag.destroy render :update do |page| page[:divtag].innerHTML = render :partial =>…
Arpit Vaishnav
  • 4,739
  • 6
  • 39
  • 57
5
votes
0 answers

Exclude from array doesn't work as expected

I'm trying to use ransack gem with acts_as_taggable. I have a simple Job model that configured acts_as_taggable in a default way and has tag_list property. When I run: Job.ransack("tags_name_in"=>["eum", "sint"]).result.to_sql It generates SQL as…
Sasha
  • 20,424
  • 9
  • 40
  • 57
5
votes
3 answers

Thinking Sphinx and acts_as_taggable_on plugin

I installed Sphinx and Thinking Sphinx for ruby on rails 2.3.2. When I search without conditions search works ok. Now, what I'd like to do is filter by tags, so, as I'm using the acts_as_taggable_on plugin, my Announcement model looks like…
Brian Roisentul
  • 4,590
  • 8
  • 53
  • 81
5
votes
1 answer

Sphinx - When to use 'has' and 'indexes' for fields

I installed Sphinx and Thinking-Sphinx some days ago on my ruby on rails 2.3.2, and basic searching works great. This means, without any conditions. Now, I want to filter the search with some conditions. I have the Announcement model, and the index…
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

How can I scope acts_as_taggable_on_stereoids by Account?

If I have my website logically split into accounts (eg. acme.mywebsite.com, xyz.mywebsite.com), how can I implement act-as-taggable-on-steroids and have the tags scoped by the current account ? To give little more details, if I am accessing acme I…
user190261
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

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

Sort tag cloud alphabetically in acts_as_taggable_on_steroids

I got the acts_as_taggable_on_steroids plugin to work fine. The tag_cloud method in my view create and formats the cloud properly however the tags are listed in order of 'count desc'. How to I present my tags in the cloud in alphabetical order?
allesklar
  • 9,506
  • 6
  • 36
  • 53
2
votes
2 answers

Saving tags with acts_as_taggable and activeadmin

I'm using ActiveAdmin and acts_as_taggable in a rails 3 app, and I can get the tag list to show fine as a checklist on edit pages, and I can add tags using the console and then remove them using the form, but it errors on saving the form if I try…
Felix
  • 159
  • 1
  • 9
2
votes
2 answers

how to find number of tag matches in acts as taggable on

I have two entries in my database Obj1 is tagged with "hello, world, planet" Obj2 is tagged with "hello" if I do modelName.tagged_with(["hello", "world", "planet", "earth"], :any=>true) I want to sort the returned objects in order of highest to…
Varun
  • 675
  • 6
  • 16
2
votes
4 answers

acts_as_taggable undefined method 'each' error

I am trying to use acts_as_taggable plugin to include tag functionality in my ruby on rails application. I have attached the code. I have installed the plugin and also run the migrations.I am getting the following error. undefined method `each' for…
felix
  • 11,304
  • 13
  • 69
  • 95
1
2 3 4