title: How to use correctly link_to and its block in rails to incorporate html tags within?
body: <p>I have this block of code :</p>
  <pre><code>&lt;div class=&quot;navbar navbar-expand-sm navbar-light navbar-lewagon&quot;&gt;
    &lt;a class=&quot;navbar-brand d-flex align-items-center&quot; href=&quot;#&quot;&gt;
      &lt;%= image_tag &quot;pokeball.png&quot;, alt: &quot;Pokeball&quot; %&gt;
      &lt;h2&gt;Cocktails Mania&lt;/h2&gt;
    &lt;/a&gt;
  &lt;/div&gt;
  </code></pre>
  <p>And I'd like to transform my <code>&lt;a&gt;</code> tag to a <code>link_to</code>. I tried with this code but it doesn't work... Anyone has a solution?</p>
  <pre><code>&lt;div class=&quot;navbar navbar-expand-sm navbar-light navbar-lewagon&quot;&gt;
    &lt;% link_to root_path, class: &quot;navbar-brand d-flex align-items-center&quot; do %&gt;
      &lt;%= image_tag &quot;pokeball.png&quot;, alt: &quot;Pokeball&quot; %&gt;
      &lt;h2&gt;Cocktails Mania&lt;/h2&gt;
    &lt;% end %&gt;
  &lt;/div&gt;
  </code></pre>
  <p>Thanks</p>