【发布时间】:2015-03-11 19:08:10
【问题描述】:
%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,但继续收到错误 Illegal element: classes and ids must have values。
【问题讨论】:
-
你在倒数第二行的末尾有一些随机的
do,并且没有结束卷曲...... -
此代码(添加缺少的
}后)不会产生该错误。 -
用于发布目的;我无法添加 } 大括号,所以删除 do?删除了do,它会中断。
-
它仍然没有产生您声称的错误。
-
@matt - 它还在 config/initializers/quiet_assets.rb call_without_quiet_assets(env).tap do 中读取错误
标签: ruby-on-rails ruby haml