title: HTML escaped in Rails 3
body: <p>I have a method call in my view like this</p>
  
  <pre><code>&lt;%= Navigation.with(params) do |menu| 
                if current_user &amp;&amp; current_user.can_verify?
                  menu.item("Listings", manage_listings_path())
                  menu.item("Listing changes", needing_change_approval_manage_listings_path())
                  menu.item("Flagged Items", flagged_manage_listings_path())
                  menu.item("Transfers", manage_listing_transfers_path())
                  menu.item("Reviews", manage_listing_reviews_path())
                end
                if current_user &amp;&amp; current_user.admin?
                  menu.item("Log", manage_verifications_path())
                  menu.item("Indexer Compensations", manage_compensations_path())
                  menu.item("Users", manage_users_path())
                end
              end%&gt;
  </code></pre>
  
  <p>that splits out the below string</p>
  
  <pre><code>"&lt;li&gt;&lt;a href="/manage/listings" class="active"&gt;Listings&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="/manage/listings/needing_change_approval"&gt;Listing changes&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="/manage/listings/flagged"&gt;Flagged Items&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="/manage/listing_transfers"&gt;Transfers&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="/manage/listing_reviews"&gt;Reviews&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="/manage/verifications"&gt;Log&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="/manage/compensations"&gt;Indexer Compensations&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="/manage/users"&gt;Users&lt;/a&gt;&lt;/li&gt;"
  </code></pre>
  
  <p>I just get this string in my page. I wanted them to be menus nicely styled by CSS. I am just getting the above raw text in my page. How do I convert this string to be treated as HTML by the browser.</p>
  
  <p>Please help</p>
  
  <p>Here is the navigation class </p>
  
  <pre><code>class NavigationMenu &lt; ActionView::Base
    def initialize(params)
      @params = params
    end
  
    def item(title, path, options={})
      @items ||= Array.new
      unless (route = Rails.application.routes.recognize_path(path,:method =&gt; options[:method]|| :get))
        raise "Unrecognised path #{path}, are you sure it's in routes.rb?"
      end
  
      @items &lt;&lt; content_tag(:li, link_to(title,path, :class =&gt; (@params[:controller] == route[:controller] &amp;&amp; @params[:action] == route[:action])? 'active' : nil))
  
    end
  
    def output
      return '' if @items.blank?
      content_tag(:ul, @items.join("\n"), :id =&gt; 'navigation')
    end
  end
  
  class Navigation
    def self.with(params, &amp;block)
      menu = NavigationMenu.new(params)
      yield menu
      menu.output
    end
  end
  </code></pre>