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

Eric the Red picture Eric the Red · Sep 4, 2010 · Viewed 18.6k times · Source

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

Daniel O&#39;Hara picture Daniel O'Hara · Sep 4, 2010

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.