【发布时间】:2012-11-23 06:33:40
【问题描述】:
在我的代码在本地计算机上运行的情况下使用 HAML 时,我的代码遇到了一个奇怪的错误,但是当我部署它时,我收到以下错误
ActionView::Template::Error(非法嵌套:纯文本内的嵌套是非法的。):
我的代码是这样的
%td{ :style => 'width:10px' }
= link_to('Dashboard', dashboard_admin_clients_account_path(client)) if client.is_member?
= link_to('Edit', edit_admin_clients_account_path(client))
- if client.removed_at.nil?
= link_to('Delete', admin_clients_account_path(client), :method => :delete, :confirm => 'Are you sure you want to delete')
- else
= link_to('Restore', restore_admin_clients_account_path(client))
我是 HAML 新手
【问题讨论】:
-
我在查找此问题的原因时遇到了一些麻烦,因为错误位于使用
render渲染的部分内部,但堆栈跟踪指向父级。
标签: ruby-on-rails ruby-on-rails-3 haml