假设我要在erb页面中显示有关如何编写erb的提示:
在helpfile.html.erb中:
Here's the right way to write a basic erb statement: <%= a = 1 %>
问题是,当将该erb文件作为rails中的视图进行处理时,文字erb <%=
被解释,因此在显示的文件中我只看到了
Here's the right way to write a basic erb statement: 1
我该怎么做?
您可以将其写为:
尝试使用实体: