Your approach is not going to work because of MenuController. For what
I know, you usually have only one controller acting per request. If
you need to switch to another controller, you usually do that trough a
What you want is a Menu model. There you add all your business logic
and create a method like menus_for(controller). Then on that partial
you can use Menu.menu_for(request[:controller]) instead of @menubar.
Then if you want to create an interface to manipulate your menus, add
items, reorder and etc you create MenuController.
You want to have all the data and business logic in the Menu MODEL.
The MenuController would be used to manipulate the data in that model,
ie add a new menu item.
That's my point of view, how I would do it...