logo       

Re: easy question, how would i search a grandparent???!: msg#00082

lang.ruby.ferret.general

Subject: Re: easy question, how would i search a grandparent???!

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

?



--
Posted via http://www.ruby-forum.com/.


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise