我有一对夫妇块帮手,下面是我在做什么一个简单的例子:Erubis块助手投掷误差CONCAT
def wrap_foo foo, &block
data = capture(&block)
content = "
<div class=\"foo\" id=\"#{foo}\">
#{data}
</div>"
concat(content)
end
我只是尝试erubis和它给我下面的错误:
You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.<<
卸下调用concat
删除错误,但我不包装渲染
使用结束:
- 的Rails 2.3.5
- Erubis 2.6.5
- 并试图this gem,帮助Erubis(虽然2.6.4)和Rails 2.3游戏更好地结合在一起
我遇到了使用Formtastic和Erubis在两条轨道2.3.4和2.3.5类似的问题。 – 2009-12-21 09:33:00