title: run a method of a controller in the application view or render from app layout to another controller method
body: <p>I hope people can understand me.. sorry if not. I'll try to explain this the best I can.
  I touch rails here and then every 8-9 months one or two times.. so I forget a lot of things so sorry if this question response is way to obvios, I honestly did my search around and did not find the same issue.(or so I thought)</p>
  
  <p>I'm using rails with  twitter bootstrap in one of my apps, the menu on the top and the right side have elements that I want to create dynamically as I create new rows in the database.
  example:
  rss feed 1
  rss feed 2
  ....
  as of now the menu is static.. I have to enter it manually in the code.
  I'm trying to do this dynamically, such will be very easy if it was all in the same controler, but since my menu view is on the application controller, i'm having issues accessing from there my rssfeed controller to get a list of rows and and auto create the menu.
  here is what I have:
  on the application.html.erb layout:</p>
  
  <pre><code>&lt;div class="container nav-collapse"&gt;
          &lt;ul class="nav"&gt;
            &lt;%= render 'rssfeeds/menu' %&gt;
          &lt;/ul&gt;
        &lt;/div&gt;&lt;!--/.nav-collapse --&gt;
  </code></pre>
  
  <p>on the rssfeeds/menu
  called _menu.html.erb</p>
  
  <pre><code>&lt;% unless  @my_rssfeeds.nil?  %&gt;
    &lt;% @rssfeeds.each do |feed| %&gt;
      &lt;li&gt;&lt;%= link_to "#{feed.title}", "rssfeeds/#{feed.id}"  %&gt;&lt;/li&gt;
    &lt;% end %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>so first I tried to put the _menu on the application controller view folder but though if this was calling the rssfeed controller to put it inside the rssfeed view folder this is why I call it with the path.</p>
  
  <p>Any ideas what is the best way to do this?</p>
  
  <p>here is another example from the log, it may help:</p>
  
  <pre><code> Rendered rssfeeds/_feed.html.erb (2.2ms)
   Rendered rssfeeds/show.html.erb within layouts/application (6.5ms)
   Rendered common/_menu.html.erb (0.4ms)
   Completed 500 Internal Server Error in 614ms
  
   ActionView::Template::Error (undefined method `each' for nil:NilClass):
   1: &lt;% @rssfeeds.each do |feed| %&gt;
   2:   &lt;li&gt;&lt;%= link_to "#{feed.title}", "rssfeeds/#{feed.id}"  %&gt;&lt;/li&gt;
   3: &lt;% end %&gt;
  </code></pre>