我button_to
在演示者内部使用。这工作正常。但是,如果我创建一个块,我会收到错误
undefined method `stringify_keys'
我想知道是否甚至可以在button_to
视图文件之外使用块。
# Inside my presenter class
# The line below causes the error
button_to 'Big Button', '/', {} do
link_to('Home', '/', { })
end.html_safe
我怎样才能解决这个问题?我错过了一些相当明显的东西吗?