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?
To make a hyperlink in an HTML page, use the <a> and </a> tags, which are the tags used to define the links. The <a> tag indicates where the hyperlink starts and the </a> tag indicates where it ends. Whatever text gets added inside these tags, will work as a hyperlink.
To use Haml with Rails, simply add Haml to your Gemfile and run bundle . If you'd like to replace Rails's ERB-based generators with Haml, add haml-rails to your Gemfile as well.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With