title: Haml: Conditional with list items?
body: <p>I've got the following block:</p>
  
  <pre><code>#control-panel
    %h3
      = "Manage"
    %ul.left-panel
      %li{:class =&gt; 'my-profile'}
        = link_to 'Profile', edit_user_path(current_user)
      %li{:class =&gt; 'my-account'}
        = link_to 'Account', edit_account_user_path(current_user)
    -if @user &amp;&amp; current_user.parent?
      %li{:class =&gt; 'my-blog'}
        = link_to 'Blog', manage_user_posts_path(current_user)
  </code></pre>
  
  <p>The problem is the if conditional on that last list item...doing it like that renders a closed <code>&lt;/ul&gt;</code> tag and then another list item. What I need is for that last list item to be a part of the unordered list if it meets the conditional.</p>
  
  <p>How do I do that?</p>