我有一對夫婦塊幫手,下面是我在做什麼一個簡單的例子: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