中间人 `concat` 视图助手不工作

问题描述

我正在尝试在 Middleman 中使用 concat(例如 the Rails one),但它似乎不起作用。例如,这不起作用:

-# index.html.haml

- helper
# custom_helpers.rb
module CustomHelpers
  def helper
    concat 'Hello,world!'
  end
end

结果是一个页面

然而,capture(如 the Rails one)如您所愿。此外,使用 concat 时不会抛出错误。它根本不起作用。

是我误解了什么还是 Middleman 不支持 concat

编辑:我还发现 haml_concat 的行为符合我的预期。为什么 concat 的工作方式不同?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)