Does anyone have the magic sql to get pagination working with acts_as_threaded? Return like: 1 - parent 1.1 - response 1.1.1 - response to response 1.2 - response 2 - parent 2.1 - response etc... up to the first 20 or so. It seems easy to get from a parent to all children, but to say get the first 20 parents and children is really hard for me to get my head around. I can imagine getting them all back and then looping through in memory but to get them all neatly in a sql call I cannot figure out. Any advice? I have currently just used an ajax call with a little "+" to get the children to draw and this works - but to give an option to have them expanded would be nice also. -- Regards, Ian Connor http://www.projectlounge.com (the code is available at svn://svn.projectlounge.com/open/light - see the discussion forum and posts model) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060622/89176127/attachment.html