search for: authors_aaf

Displaying 1 result from an estimated 1 matches for "authors_aaf".

2007 Oct 08
1
Can you alias fields in acts_as_ferret?
...ails, I''m using acts_as_ferret on a Article model that has_many Authors. I want to be able to index authors'' names with each article. Since @article.authors yields an array of Author objects (and not an indexable string), I''ve created this method in my Article model: def authors_aaf @authors.collect {|a| a.name }.to_sentence end I call it "authors_aaf" because "authors" would cause a conflict. But I want my field name to be "authors", because that makes the most sense. (Users shouldn''t have to type "authors_aaf:Joe" to search...