title: Dynamic menu with Rails (referencing outputs of two Controllers in one view)
body: <p>I've been trying to find a way to display a side-menu generated from a database by the application. Since the menu needed to be user-editable, I thought the best course of action would be to create it as a scaffold and just add a 'show menu' action that would render the menu in a tree-like fashion, while the rest of the scaffold would allow admin users to modify menu items. </p>
  
  <p>Now, I'm presented with a small problem - I can not figure out a way to 'call' the show menu action from application.html.erb (which I'm using as a wrapper for all actions and controllers). It has a main 'body' where it has a 'yield' line, which will obviously let whichever controller is referenced to render it's output. Before that, I would have liked to show the dynamic menu in a different part of that html.</p>
  
  <p>Is that possible, and how would one go about doing that? </p>
  
  <p>Because the same menu is supposed to be visible regardless of which particular action (view) is being displayed, I wanted to avoid putting the same 'menu rendering' logic in every view of every controller of my application. </p>