# Tree structure in rails?

**URL:** <https://www.ruby-forum.com/t/tree-structure-in-rails/147093>\
**Category:** Rails\
**Created:** [August 28, 2008, 12:49pm UTC](https://www.ruby-forum.com/t/tree-structure-in-rails/147093 "2008-08-28T12:49:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sunfish](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/96bed5/32.png) [@sunfish](https://www.ruby-forum.com/u/sunfish)\
**Post date:** [August 28, 2008, 12:49pm UTC](https://www.ruby-forum.com/t/tree-structure-in-rails/147093/1 "2008-08-28T12:49:32Z")

</div>

Hi,  
Is there is any way in ruby on rails where we show all my groups there  
subgroups  
with check boxes in tree structure way?

```
e.g
     group A
        |
        ----Group A.1
        |
         ----Group A.2
                 |
                 ---------Group A.2.1

```

All with check boxes and subgroup opens when click on root ?

---

<div class="post-metadata">

**Author:** ![sunfish](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/96bed5/32.png) [@sunfish](https://www.ruby-forum.com/u/sunfish)\
**Post date:** [August 28, 2008, 1:15pm UTC](https://www.ruby-forum.com/t/tree-structure-in-rails/147093/2 "2008-08-28T13:15:45Z")

</div>

Sunny B. wrote:

> Hi,  
> Is there is any way in ruby on rails where we show all my groups there  
> subgroups  
> with check boxes in tree structure way?
> 
> ```
> e.g
> group A
> |
> ----Group A.1
> |
> ----Group A.2
> |
> ---------Group A.2.1
> 
> ```
> 
> All with check boxes and subgroup opens when click on root ?

“any answer?”

---

<div class="post-metadata">

**Author:** ![sunfish](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/96bed5/32.png) [@sunfish](https://www.ruby-forum.com/u/sunfish)\
**Post date:** [August 28, 2008, 1:18pm UTC](https://www.ruby-forum.com/t/tree-structure-in-rails/147093/3 "2008-08-28T13:18:04Z")

</div>

Sunny B. wrote:

> Sunny B. wrote:
> 
> > Hi,  
> > Is there is any way in ruby on rails where we show all my groups there  
> > subgroups  
> > with check boxes in tree structure way?
> > 
> > ```
> > e.g
> > group A
> > |
> > ----Group A.1
> > |
> > ----Group A.2
> > |
> > ---------Group A.2.1
> > 
> > ```
> > 
> > All with check boxes and subgroup opens when click on root ?

“I want tree-view set of +/- check boxes that open and close to  
reveal/hide lower level groups. Checking higher level boxes will  
automatically mean checking boxes farther down on the tree, but checking  
lower level boxes will not produce auto-checking of higher level boxes:  
E.g:-  
Main Group I.  
Â Â Â Subgroup 1.  
Â Â Â Subgroup 2.  
Â Â Â Â Â Â Â Subgroup 2a.  
Â Â Â Subgroup 3.  
Â Â Â Subgroup 4.  
Â Â Â Subgroup 5.  
Â Â Â Â Â Â Â Subgroup 5a.  
Â Â Â Â Â Â Â Subgroup 5b.  
Â Â Â Â Â Â Â Â Â Â Â Subgroup 5b-1.”
