0
somevariable = "hello"
answer = {yesorno: "yes"}
anotheranswer = {whatisit: somevariable}
erb :index, :locals => answer, anotheranswer
当我尝试运行它说服务器:Ruby:你如何将多个locals传入index.erb?
语法错误,意想不到的 '\ n',期待=>。
如果我从当地人中删除anotheranswer
,那么它只是通过一个答案,并且它工作正常。
如何传递多个:locals
?