# Creating menus with Ruby

**URL:** <https://www.ruby-forum.com/t/creating-menus-with-ruby/68341>\
**Category:** Rails\
**Created:** [September 11, 2006, 10:39pm UTC](https://www.ruby-forum.com/t/creating-menus-with-ruby/68341 "2006-09-11T22:39:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hotgazpacho](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/a587f6/32.png) [@hotgazpacho](https://www.ruby-forum.com/u/hotgazpacho)\
**Post date:** [September 11, 2006, 10:39pm UTC](https://www.ruby-forum.com/t/creating-menus-with-ruby/68341/1 "2006-09-11T22:39:08Z")

</div>

Hello all,  
I’m continuing my journey into Ruby and Rails and would like to find a  
way to create CSS-compliant menus. I want to restrict what appears on  
the menu based on the user’s role, so I’m thinking that I’ll store the  
list of roles in which the user is a member in the session. Does this  
make sense?

Better yet, does anyone have any sample code (or a component) that  
already does the job? I’m looking for roughly the same level of  
functionality as you would find in the XmlSiteMap and Menu controls in  
[ASP.NET](http://ASP.NET) (except I want it to actually be CSS compliant).

Thanks,  
Will

* * *

Do you Yahoo!?  
Get on board. You’re invited to try the new Yahoo! Mail.

---

<div class="post-metadata">

**Author:** ![hotgazpacho](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/a587f6/32.png) [@hotgazpacho](https://www.ruby-forum.com/u/hotgazpacho)\
**Post date:** [May 5, 2007, 7:34pm UTC](https://www.ruby-forum.com/t/creating-menus-with-ruby/68341/2 "2007-05-05T19:34:04Z")

</div>

Hi,

I am also looking for a similar solution. Can you please tell me as to  
how you did it ?

Will G. wrote:

> Hello all,  
> I’m continuing my journey into Ruby and Rails and would like to find a  
> way to create CSS-compliant menus. I want to restrict what appears on  
> the menu based on the user’s role, so I’m thinking that I’ll store the  
> list of roles in which the user is a member in the session. Does this  
> make sense?
> 
> Better yet, does anyone have any sample code (or a component) that  
> already does the job? I’m looking for roughly the same level of  
> functionality as you would find in the XmlSiteMap and Menu controls in  
> [ASP.NET](http://ASP.NET) (except I want it to actually be CSS compliant).
> 
> Thanks,  
> Will
> 
> * * *
> 
> Do you Yahoo!?  
> Get on board. You’re invited to try the new Yahoo! Mail.
