Adding a menu to the application layout

Hi Bill,

If this needs to be loaded for every controller, which it sounds like it does, you could put a before filter in application.rb (the ancestor to all controllers). It would look something like

class ApplicationController < ActionController::Base   before_filter :load_menu

  def load_menu     @menu = ...   end end

Since you define the before filter in application.rb, it automatically runs at the beginning of all other controllers. If you want to control which controllers call it, take out the before_filter line in application.rb and put it in each controller you want to call the method.

Hope that makes sense.

Peace, Phillip