Displaying 1 result from an estimated 1 matches for "menu_el".
Did you mean:
mencel
2007 Jan 25
4
How to change the menu depending on the controller/method?
...llo,
I''m still dtarting with ruby on rails. And I''m trying to have a menu
depending on the current controller/method.
Here is what I was thinking of (please tell me if there''s a better way
to do it):
I have a database with menu_groups (corresponding to controllers) and
menu_elements(corresponding to methods). Each menu_element belongs to
one menu_group.
I created a class Menu where I get all the menu_groups and
menu_elements, and where I have the active controller and method.
"
class Menu
attr_reader :menu_groups
attr_reader :menu_group_active
attr_reader :m...