Displaying 1 result from an estimated 1 matches for "menucontrol".
Did you mean:
memcontrol
2006 Feb 19
2
instance variables in components not read by component view?
Hi,
I''m trying to write a sidebar menu with dynamic menus, and to do so I
would like to define a list of menus to display within my sidebar
component controller code and pass that list to the component display
view, like so:
# menu_controller.rb
class Sidebar::MenuController < ActionController::Base
uses_component_template_root
@menus = %w{admin user help}
def display
@display_menu = params[:menu]
render(:layout => false)
end
end
# menu/display.rhtml
<div class="menu">
<% @menus.each do |menu| %>
<%= link_to_remote &...