title: Help with nested content_tag in ruby on rails 3
body: <p>I'm using this method in <code>application_helper.rb</code> to show the flash. But, I need it to show the content of the flash and the link to make the flash fade away, and I can't seem to do that. All it does right now is show a "close" link.</p>
  
  <pre><code>  def show_flash
        [:notice, :error, :alert].collect do |key|
          content_tag(:div, (flash[key] and content_tag(:a, "close", :class =&gt; "#{key}", :href =&gt; "#", :onclick =&gt; "$('messages').fade(); return false;")), :id =&gt; key, :class =&gt; "flash_#{key}") unless flash[key].blank?
        end.join
    end
  </code></pre>