Hmm. I tried doing it with a few levels of nesting like:
acts_as_ferret :fields => { :menu_item_name, 'city', 'state', 'zip' }
def menu_item_name
menus.menu_categories.menu_items.name
end
And I don't get any results.
The tables in the DB are like:
menus
menu_categories
menu_id
menu_items
menu_category_id
Am I missing something???
Maxime Curioni wrote:
> Thanks Jens, I didn't know it was that simple !
>
>
>> you could use
>>
>> acts_as_ferret :fields => [ 'title', 'content', :category_name]
>> def category_name
>> category.name
>> end
>>
>> to achieve this.
>>
>> Jens
--
Posted via http://www.ruby-forum.com/.
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk