On 25 November 2015 at 16:25, fugee ohu <fugee...@gmail.com> wrote:
>> What is the relationship between listing and category?
>> In what way is a listing "in" a category.
>> What is a leaf category?
>> What do you mean by listings in leaf category?
>>
>> Colin
>
>
>  categories has_many listings and listings belongs_to categories
>  a listing is in a category because the listing has a category_id field
>  leaf category is a category that has no children categories
>  listings can only be placed in leaf categories but can be seen when
> browsing it's parent categories So if someone's selling a toaster oven, they
> had to place the listing in Household->Kitchen->Small appliances->Toaster
> ovens but as soon as a user navigates only as far as Household they'll see
> lisings including the toaster ovens and in the side pane should be links to
> all the categories beneath whatever category the user is currently in

Right, now we are getting somewhere.
So you want all the descendant categories of the current category
(children, grand children etc), and all the listings belonging to all
those categories.  Is that right?

Colin

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLuhXVGREjx3QinVL%3DJLY%3DeCxoR7_jVPoLWUprNhPnB0uA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to