Unless I am missing something...Make layouts out of your menus then do
something like this
In your controllers or even your application.rb
layout :select_layout
then this method at the end of your controller
private
def select_layout
['action_name1', 'action_name2'].include?(action_name) ? "layout1"
: "layout2"
end
No - you make a layout for the menu - how many menus do you have? Your
menu should retain a consistant look across most of your
controllers/actions - unless I am not understanding something. I don't
understand what you mean by "the situation my menu will be in (=the
number of method I'll have)" If you mean, for example, that you want
the "comments" menu item to be a different color when you are
performing that action then use CSS and helper methods like
link_to_unless_current amongst others.
It seems like you might want to read some ofthe multiple of books this
list preaches about.