Displaying 1 result from an estimated 1 matches for "menu_group_act".
2007 Jan 25
4
How to change the menu depending on the controller/method?
...onding 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 :menu_elements
attr_reader :menu_element_active
def initialize
current_url_elements=request_uri().split("/")
@menu_groups << MenuGroup.find(:name,:order => "id")
@menu_group_active = controller.controller_name
@menu_elements <<...