title: can't convert Array into String - add <ul> tag
body: <p>I have the following controller code:</p>
  
  <pre><code>class NodesController &lt; ApplicationController
  
    def index
      @nodes = Node.com_name_scope("27").find(:all, :conditions =&gt; ['COMPONENT_NAME LIKE ?', "#{params[:search]}%"])
  
      respond_to do |format|
        format.js {render :js =&gt; @nodes.map { |node|  "&lt;li&gt;#{node.COMPONENT_NAME}&lt;/li&gt;"}}
      end
  end
  </code></pre>
  
  <p>When I do:</p>
  
  <pre><code>http://localhost/myproject/nodes.js
  </code></pre>
  
  <p>I get the following list:</p>
  
  <pre><code>&lt;li&gt;Value A&lt;/li&gt;
  &lt;li&gt;Value B&lt;/li&gt;
  &lt;li&gt;Value C&lt;/li&gt;
  &lt;li&gt;Value D&lt;/li&gt;
  </code></pre>
  
  <p>I would like to insert a <code>&lt;ul&gt;</code> tag at the start and end of the list so that it look as follows:</p>
  
  <pre><code>&lt;ul&gt;
  &lt;li&gt;Value A&lt;/li&gt;
  &lt;li&gt;Value B&lt;/li&gt;
  &lt;li&gt;Value C&lt;/li&gt;
  &lt;li&gt;Value D&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>But when I do:</p>
  
  <pre><code>format.js {render :js =&gt; "ul" + @nodes.map { |node|  "&lt;li&gt;#{node.COMPONENT_NAME}&lt;/li&gt;"}+ "&lt;/ul&gt;" }
  </code></pre>
  
  <p>It is giving me the following error message:</p>
  
  <pre><code> TypeError in NodesController#index
  
  can't convert Array into String
  </code></pre>
  
  <p>My question is how do I include the <code>&lt;ul&gt;</code> tag in front and at the end of the list.</p>
  
  <p>Thanks a lot for your help</p>