如何用slim模板语言编写以下内容?
<p>Join the <a href="">Google group</a> and let us know what you think, or what other features you’d like to see.</p>
我尝试了以下内容:
p
' Join the
a href="" Google Group
' and let us know what you think, or what other features you’d like to see
但这不起作用,因为“Group”和“and”这两个词之间没有空格。
答案 0 :(得分:21)
显然你可以在引用后添加额外的空格:
p
' Join the
a href="" Google Group
' and let us know what you think, or what other features you’d like to see
答案 1 :(得分:6)
你可以做到
p This is a paragraph with a link #{link_to 'embedded', 'http://google.com'}.
Rails标记帮助程序只是方法,因此您可以将该逻辑应用于视图内的其他方法。