Displaying 1 result from an estimated 1 matches for "current_url_el".
2007 Jan 25
4
How to change the menu depending on the controller/method?
...nu_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 << MenuElement.find(:all,:order => "menu_group_id
id")
@menu_elements_active = current_...