I am trying to refactor some of the code in my view
<% if controller.controller_name == "overview" %>
<div id="left-menu">
<ul>
<li>Office</li>
<hr>
<li><%= link_to "Overview", root_path %></li>
<li><%= link_to "Personnel", personnel_path %></li>
<li><%= link_to "Results", results_path %></li>
<li><%= link_to "Statistics", statistics_path %></li>
</ul>
<ul>
<li>Economy</li>
<hr>
<li>Finances</li>
<li>Contracts</li>
<li>Transfers</li>
<li>Sponsors</li>
</ul>
</div>
<% elsif controller.controller_name == "market" %>
<div id="left-menu">
<ul>
<li>Items</li>
<hr>
<li><%= link_to "Engines", market_engines_path %></li>
<li><%= link_to "Weapons", market_weapons_path %></li>
<li><%= link_to "Armor", market_armor_path %></li>
<li><%= link_to "Chips", market_chips_path %></li>
</ul>
<ul>
<li>Personnel</li>
<hr>
<li><%= link_to "Drivers", market_drivers_path %></li>
<li><%= link_to "Servicemen" %></li>
<li><%= link_to "Programmers" %></li>
<li><%= link_to "Managers" %></li>
</ul>
</div>
<% end %>
Where each <li>
corresponds to a method in the controller. I would like to be able to add new methods to my controllers, and then have them dynamically inserted in the view. So is there a way to iterate over the methods in a controller?