Submenu in Rails

Hi All,

Is it necessary to have a separate controller for each sub-menu and
sub-sub-menus.

I want the nav buttons of the main section and the sub-menu point to
each
other, is this possible with rails partials ?

Is there any tutorial for sub-menus ?

Thanks & Warm Regards,

2011/2/17 Bhasker H. [email protected]

Hi All,

Is it necessary to have a separate controller for each sub-menu and
sub-sub-menus.

No, it’ s not necessary . The issue of menus, sub-menu etc are graphical
layout that can be customized by CSS and HTML. suppose we have the
following
menu:

Items
|  New Item
---------------

| List |
----------------------------------
| By catergory |
--------------------
| By name |
--------------------

The corresponding actions can be in one controller say,
items_controller.rb.

I want the nav buttons of the main section and the sub-menu point to each
other, is this possible with rails partials ?

A partial in nothing but a device for breaking the rendering process
into
more manageable chunk. When you look at partials look at them as
super-methods (super-functions) that can be used and reused in several
places. So the issue of partials has somehow nothing to do with your
navigation buttons.

Is there any tutorial for sub-menus ?

I haven’t searched for one, but that is a wake up call for me to create
one
for rails newbies!!

Cheers,


Edmond
Software Developer | Baobab Health Trust (http://www.baobabhealth.org/)
|
Malawi

Cell: +265 999 465 137 | +265 881 234 717

An old dog does not hunt because of speed, but his endurance of the
heart.

*
*

On Feb 17, 11:01am, Bhasker H. [email protected]
wrote:

Hi All,

Is it necessary to have a separate controller for each sub-menu and
sub-sub-menus.

I want the nav buttons of the main section and the sub-menu point to each
other, is this possible with rails partials ?

Is there any tutorial for sub-menus ?

The first place I go to for tips/tricks and tuts is Railscasts. Check
out:
http://railscasts.com/episodes/162-tree-based-navigation

It may not be everything you want/need, but it may give a few
pointers. I’m going to give it a watch tonight and add it to my own
ref library.

Paul

Le 17 fvrier 2011 18:04:42 UTC+2, edmond.kachale <
[email protected]> a crit :

You may also wish to have a look at this one:

http://www.killswitchcollective.com/articles/13_best_practices_for_rails_partials

I haven’t scrutinized it, but I just bumped into it online.


Edmond
Software Developer | Baobab Health Trust (http://www.baobabhealth.org/)
|
Malawi

Cell: +265 999 465 137 | +265 881 234 717

An old dog does not hunt because of speed, but his endurance of the
heart.

*
*

Hi Paul,

I shall def. have a look at it soon, currenlty my Centos has problem and
not
able to view any mov files.

Warm Regards,

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs