On Mon, Mar 26, 2007 at 10:54:12AM +0200, Jin wrote:
> cheers for new release
> but still got some questions about the mechanizm of aaf
> my task of search function has to save the tag words in table just like 
> a_a_taggable because customer need hot tags function
> i wanna know how could i use database instead of file system to store 
> index or tags

I'm not sure I understand what you want to achieve, but I'll try...

if you want to search your tags with ferret, just define a function that
returns a string with all tags of your object, and index that function
by simply specifying it's name in the field list:

class Model
  acts_as_ferret :fields => [ :name, :tag_string ]

  def tag_string
    tags.map(&:name).join(' ')
  end
end


does that answer your question?

Jens

-- 
Jens Krämer
webit! Gesellschaft für neue Medien mbH
Schnorrstraße 76 | 01069 Dresden
Telefon +49 351 46766-0 | Telefax +49 351 46766-66
[EMAIL PROTECTED] | www.webit.de
 
Amtsgericht Dresden | HRB 15422
GF Sven Haubold, Hagen Malessa
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to