在我的 Rails 项目中,我正在使用haml_assets gem
文件内容registration.jst.eco.haml
:
= form_for :contact, url: "javascript_not_working", html: {:class => :edit_contact, :method => :put} do |f|
= f.label :name, "Name"
= f.text_field :name, class: 'text required', value: '{{name}}'
当我运行 jasmine 测试时,我在浏览器中遇到了这个错误:
TypeError: Object true has no method 'replace'
(in .../app/assets/templates/users/registration.jst.eco.haml)
在控制台中:
ERROR: compiling .../app/assets/templates/users/registration.jst.eco.haml
RAISED undefined method `rails_safe_buffer_class' for Haml::Util:Module
我什至只尝试了助手:
= form_for :contact
和错误相同
如何修复此错误?谢谢