%h3 Regulations
%table.table.table-striped
%thead
%tr
%th.cls-th-100 Name
%th.cls-th Title
%th
%th
%tbody
- @regulations.each do |regulation|
%tr
%td= link_to regulation.name, admin_regulation_path(regulation)
%td= regulation.title
%td
= link_to edit_admin_regulation_path(regulation) do
%span.glyphicon.glyphicon-edit
%td
= link_to admin_regulation_path(regulation), method: :delete, data: { confirm: 'Are you sure?'} do
%span.glyphicon.glyphicon-trash我正在尝试注释掉glyphicon-edit和glyphicon-trash,但仍然收到错误:非法元素: classes和id必须有值。
发布于 2015-02-09 17:14:20
关于关闭dos和缺少卷曲的一些令人困惑的评论.....haml的一个要点是你不需要结束你的标签(或控制语句)-- haml会为你做这件事。
要在haml中进行注释,您可以在该行前面加上-#
-# %span.glyphicon.glyphicon-edit这是纯红宝石。破折号开始一行拼音代码,#是拼音中的注释符号。
https://stackoverflow.com/questions/27928722
复制相似问题