|
Re: easy question, how would i search a grandparent???!: msg#00083lang.ruby.ferret.general
On Tue, Dec 12, 2006 at 01:56:48PM +0100, koloa wrote: > hi Jens, > Thanks i found out what i needed in this thread > > http://www.ruby-forum.com/topic/72206#104924 > > i guess for the grandparent, i will just do... > > ============================= > | posts > ============================= > id > title > content > category_id > > ============================= > | categories > ============================= > id > name > grandparent_id > > ============================= > | grandparent > ============================= > id > name > ------------------------------ > > > class Posts > acts_as_ferret :fields => [ 'title', 'content', :grandparent_name] > > def grandparent_name > category.maincategories_id.name > end > > ? from your tables above I'd guess category.grandparent.name Jens -- webit! Gesellschaft für neue Medien mbH www.webit.de Dipl.-Wirtschaftsingenieur Jens Krämer kraemer-jv+WEUQhfkc@xxxxxxxxxxxxxxxx Schnorrstraße 76 Tel +49 351 46766 0 D-01069 Dresden Fax +49 351 46766 66 |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: easy question, how would i search a grandparent???!: 00083, koloa |
|---|---|
| Next by Date: | Re: easy question, how would i search a grandparent???!: 00083, koloa |
| Previous by Thread: | Re: easy question, how would i search a grandparent???!i: 00083, koloa |
| Next by Thread: | Re: easy question, how would i search a grandparent???!: 00083, koloa |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |