# \[ANN\] acts\_as\_threaded plugin

**URL:** <https://www.ruby-forum.com/t/ann-acts-as-threaded-plugin/101480>\
**Category:** Rails\
**Created:** [February 6, 2006, 4:03am UTC](https://www.ruby-forum.com/t/ann-acts-as-threaded-plugin/101480 "2006-02-06T04:03:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![adistarmid](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/f14d63/32.png) [@adistarmid](https://www.ruby-forum.com/u/adistarmid)\
**Post date:** [February 6, 2006, 4:03am UTC](https://www.ruby-forum.com/t/ann-acts-as-threaded-plugin/101480/1 "2006-02-06T04:03:41Z")

</div>

This plugin is related to the acts\_as\_nested\_set functionality but  
differs  
in that it allows multiple roots to exist within your database.

The other benefit, is that when adding a child, it doesn’t perform a  
full  
table update to rebuild the tree, each child insertion only affects the  
tree  
that it is placed in.

It even comes with my first screencast to show how you can build an old  
school threaded forum.

Check it out if you need this extended functionality.

[http://www.railtie.net/articles/2006/02/05/rails-acts\_as\_threaded-plugin](http://www.railtie.net/articles/2006/02/05/rails-acts_as_threaded-plugin)

It’s certainly possible that acts\_as\_nested\_set can be massaged to  
provide  
this functionality, but I found it quicker and easier to build it  
myself.

This is a 0.1 version and I haven’t created the unit tests for it yet.  
Please send bug reports and feature requests back my way.

Enjoy!

Bob S.

[http://www.railtie.net/](http://www.railtie.net/)

---

<div class="post-metadata">

**Author:** ![adistarmid](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/f14d63/32.png) [@adistarmid](https://www.ruby-forum.com/u/adistarmid)\
**Post date:** [February 6, 2006, 6:57am UTC](https://www.ruby-forum.com/t/ann-acts-as-threaded-plugin/101480/2 "2006-02-06T06:57:43Z")

</div>

Great plugin and amazing screencast ! What tool did you use to create  
it ?

---

<div class="post-metadata">

**Author:** ![adistarmid](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/f14d63/32.png) [@adistarmid](https://www.ruby-forum.com/u/adistarmid)\
**Post date:** [February 6, 2006, 7:46am UTC](https://www.ruby-forum.com/t/ann-acts-as-threaded-plugin/101480/3 "2006-02-06T07:46:26Z")

</div>

Excellent screencast. I’ll be sure to check out your plugin when I get  
the opportunity to do so.

---

<div class="post-metadata">

**Author:** ![adistarmid](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/f14d63/32.png) [@adistarmid](https://www.ruby-forum.com/u/adistarmid)\
**Post date:** [March 13, 2006, 8:52pm UTC](https://www.ruby-forum.com/t/ann-acts-as-threaded-plugin/101480/4 "2006-03-13T20:52:10Z")

</div>

From: Bob S.

> [http://www.railtie.net/articles/2006/02/05/rails-acts\_as\_threaded-plugin](http://www.railtie.net/articles/2006/02/05/rails-acts_as_threaded-plugin)

Hi, I think this is probably a general newbie Rails question,  
not necessarily specific to this plugin. But I’m following  
the screencast, duplicating the steps shown, trying to arrive  
at the same fledgeling threaded forums Rails app.

I’ve gotten to where I’m creating my first new post, and I’m  
seeing a difference between the screencast and my own app.

The screencast “New post” form starts out with the Depth, Lft,  
and Rgt fields already pre-filled with zeros:

[http://tastyspleen.net/~billk/acts\_as\_threaded\_post\_defaults.png](http://tastyspleen.net/~billk/acts_as_threaded_post_defaults.png)

Whereas, in my app, these fields are blank:

[http://tastyspleen.net/~billk/acts\_as\_threaded\_post\_nodefaults.png](http://tastyspleen.net/~billk/acts_as_threaded_post_nodefaults.png)

[(And even if I fill in those fields, when I submit the post, it  
seems some hidden fields like root\_id and parent\_id are NULL that  
I think should have had some default value, as well.)]

My question is, can anyone give me some hints as to what would  
allow the screencast app to have default values for some fields,  
whereas my app does not?

I’m wondering if it’s something at the database level . . . .

Thanks for your help!

Regards,

Bill
