htmlruby-on-railshaml

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?


Solution

  • 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.