need help for dynamic menus

By dynamic menus, I assume you mean you want a navbar or something in
the layout to change based on the context of a user's session. So, you
may have different tools associated with each page, right?

Assuming we're on the right track, I'd explore using the flash system
for something like that. So, you could set your flash[:navbar] to
something in your application controller, and then override it where
you would like to have it work differently in other controllers.

Also, I found this helpful in Scott Raymond's Ajax on Rails book. He
puts a simple method in his application_helper.rb:

def flash_div *keys
  divs = { |k| flash[k] }.collect do |k|
    content_tag :div, flash[k], :class => "flash #{k}"