# Awesome\_nested\_set

**URL:** <https://www.ruby-forum.com/t/awesome-nested-set/144252>\
**Category:** Rails\
**Created:** [July 27, 2008, 5:51pm UTC](https://www.ruby-forum.com/t/awesome-nested-set/144252 "2008-07-27T17:51:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![subv3](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/9f8e36/32.png) [@subv3](https://www.ruby-forum.com/u/subv3)\
**Post date:** [July 27, 2008, 5:51pm UTC](https://www.ruby-forum.com/t/awesome-nested-set/144252/1 "2008-07-27T17:51:30Z")

</div>

Hi,

I’ve been trying to setup a threaded comments system all weekend using  
various plugins and I’m now trying to use awesome\_nested\_set (http://  
[GitHub - collectiveidea/awesome\_nested\_set: An awesome replacement for acts\_as\_nested\_set and better\_nested\_set.](http://github.com/collectiveidea/awesome_nested_set/tree/master)) which seems  
to be the most up-to-date nested plugin for Rails.

Unfortunately there is very little documentation around for this  
plugin and it’s too complex for my brain.

I’ve got my models set up as follows (stripped down):

class Post \< ActiveRecord::Base  
has\_many :comments  
end

class Comment \< ActiveRecord::Base  
acts\_as\_nested\_set  
belongs\_to :user  
end

Now what I want to do is get all the comments for a Post in _one_  
query and I then want to display the Comments as a multi-level  
unordered list (possibly using a helper which yields to a block?).

Can anyone help me out?

Thanks
