# Messaging system

**URL:** <https://www.ruby-forum.com/t/messaging-system/141181>\
**Category:** Rails\
**Created:** [June 23, 2008, 11:14am UTC](https://www.ruby-forum.com/t/messaging-system/141181 "2008-06-23T11:14:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![teenage](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/aca169/32.png) [@teenage](https://www.ruby-forum.com/u/teenage)\
**Post date:** [June 23, 2008, 11:14am UTC](https://www.ruby-forum.com/t/messaging-system/141181/1 "2008-06-23T11:14:01Z")

</div>

Hey All,  
I’m trying to put a messaging system together using this  
[http://www.novawave.net/public/rails\_messaging\_tutorial.html](http://www.novawave.net/public/rails_messaging_tutorial.html).

All working fine but I’d like to be to thread the replies.

At the moment, a message goes out, someone replies to it and the  
original is simply included in the reply. I’d like to be able to thread  
the replies using acts\_as\_tree or something but I can’t get my head  
round where to start… I had a long week end thinking about it and no  
luck… anyone to help?

My code so far is the nearly the same as the one in the tutorial but I  
have acts as tree in the message\_copy model, I just don’t know where I’m  
suppose to deal with the parent\_id thingy…

Please help ☹

Oli

---

<div class="post-metadata">

**Author:** ![teenage](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/aca169/32.png) [@teenage](https://www.ruby-forum.com/u/teenage)\
**Post date:** [June 23, 2008, 3:07pm UTC](https://www.ruby-forum.com/t/messaging-system/141181/2 "2008-06-23T15:07:00Z")

</div>

On Jun 23, 5:14 am, Olivier B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> All working fine but I’d like to be to thread the replies.

You might want to look into the BetterNestedSet plugin:  
[http://agilewebdevelopment.com/plugins/betternestedset](http://agilewebdevelopment.com/plugins/betternestedset)

---

<div class="post-metadata">

**Author:** ![teenage](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/aca169/32.png) [@teenage](https://www.ruby-forum.com/u/teenage)\
**Post date:** [June 23, 2008, 4:57pm UTC](https://www.ruby-forum.com/t/messaging-system/141181/3 "2008-06-23T16:57:21Z")

</div>

I’ll give that a go, than kyou for your reply 🙂

Matt D. wrote:

> On Jun 23, 5:14ï¿½am, Olivier B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> wrote:
> 
> > All working fine but I’d like to be to thread the replies.
> 
> You might want to look into the BetterNestedSet plugin:  
> [http://agilewebdevelopment.com/plugins/betternestedset](http://agilewebdevelopment.com/plugins/betternestedset)
