title: haml pull-right as a second class not working when followed by an if
body: <p>So I have this piece of .erb code I want to translate to .haml. (some says haml is faster, I think i'm still strugling within the learning curve ;) )</p>
  
  <pre><code>&lt;div class="row"&gt;
    &lt;div class="col-md-12"&gt;
      &lt;ul class="list-inline pull-right"&gt;
        &lt;% if current_page?(webservices_path) %&gt;
        &lt;li class="submenu_links_current"&gt;
        &lt;% else %&gt;
        &lt;li class="submenu_links"&gt;
        &lt;% end %&gt;
          &lt;%= link_to webservices_path do %&gt;
            &lt;i class="fa fa-home" aria-hidden="true" style="color: white;"&gt;&lt;/i&gt;
            Webservices
          &lt;% end %&gt;
        &lt;/li&gt;
      &lt;/ul&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>The nearest haml translation I have atm :</p>
  
  <pre><code>.row
    .col-md-12
      %ul.list-inline.pull-right
      - if current_page?(webservices_path)
        %li.submenu_links_current
          = link_to webservices_path do
            %i.fa.fa-home{"aria-hidden" =&gt; "true", "style" =&gt; "color: white;"}
            Webservices
      - else
        %li.submenu_links
          = link_to webservices_path do
            %i.fa.fa-home{"aria-hidden" =&gt; "true", "style" =&gt; "color: white;"}
            Webservices
  </code></pre>
  
  <p>I have two problems with this haml right now.</p>
  
  <p>.pull-right is not applied to ul if there's an if statement between ul and li.</p>
  
  <p>I also found that this following more factorized code doesn't work since while currently on webservices_path, link_to webservices_path is not displayed.</p>
  
  <pre><code>.row
    .col-md-12
      %ul.list-inline.pull-right
      - if current_page?(webservices_path)
        %li.submenu_links_current
      - else
        %li.submenu_links
          = link_to webservices_path do
            %i.fa.fa-home{"aria-hidden" =&gt; "true", "style" =&gt; "color: white;"}
            Webservices
  </code></pre>
  
  <p>Thanks !</p>