How to create a collection of collections?
Hi
I'm using awesome nested set to return ancestors and self_and_siblings from a tree database structure. I would like to create an object of those both, pass to a partial which iterates over the ancestors (2 * UL's) and passes to another partial which iterates over the siblings (x * LI's).
Basically how do i do this:
@collection.ancestors = Nutrient.find(params[:id]).ancestors
@collection.siblings = Nutrient.find(params[:id]).self_and_siblings
I have tried that and:
@nutrients = {:children => @children, :parents => @parents }
I realise this is probably really simple but I have wasted a good couple of hours on this already and would really appreciate some help. :S