title: rails content_tag nav builder helper
body: <p>Sorry if this sounds obvious but i'm getting confused.
  I'm trying to build a navigation list helper.</p>
  
  <p>At the moment it receives a list of links from an array.</p>
  
  <pre><code>module ApplicationHelper
    def site_pages
      %w{index about contact promotions}
    end
  
    def nav_builder list     
      list.map do |l|
        content_tag :li do
          content_tag :a, :href =&gt; "#{l}_path" do
            l
          end
        end
      end
    end
  end
  </code></pre>
  
  <p>But when I run the page it ouput everything is the page as an array.</p>
  
  <pre><code>[&lt;li&gt;&lt;a href="index_path"&gt;index&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="about_path"&gt;about&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="contact_path"&gt;contact&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="promotions_path"&gt;promotions&lt;/a&gt;&lt;/li&gt;]
  </code></pre>
  
  <p>instead of displaying a list of links.
  Is there anything special to do?</p>
  
  <p>==EDIT==</p>
  
  <p>I call my builder this way: </p>
  
  <pre><code>&lt;%= nav_builder site_pages %&gt;
  </code></pre>