acts-as-taggable

Thinking Sphinx and acts_as_taggable_on plugin

。_饼干妹妹 提交于 2019-11-27 12:08:56
问题 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 this: class Announcement < ActiveRecord::Base acts_as_taggable_on :tags,:category define_index do indexes title, :as => :title, :sortable => true indexes description, :as => :description, :sortable => true indexes tags.name, :as => :tags indexes category

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

梦想的初衷 提交于 2019-11-27 04:58:45
问题 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 acts_as_taggable but I'm not sure if that's what I should be using. Is there something newer? I'm getting results from 2007 when I google acts_as_taggable 回答1: acts_as_taggable_on and rails3-jquery-autocomplete work nicely together to make a SO like tagging