Eric the Red Eric the Red - 6 months ago 16
HTML Question

How do I put a link in the middle of a paragraph with HAML?

How do I create this:

<p>
I would like to make a <a href="foo.html">link</a> in my Rails app.
</p>


with HAML?

Answer

1.

%p
  I would like to make a
  %a
    link
  in my Rails app.

2.

%p
  I would like to make a <a href="#">link</a> in my Rails app.