0
我正在使用Rails 4,ruby 2和jbuilder gem來響應json。如何在同一頁面上使用jbuilder創建部分和變量gem
我index.json.jbuilder
在下面的代碼寫入
json.partial! "apis/contents", comments: @comments
json.name @name
返回以下錯誤文件: -
no implicit conversion of String into Integer
我想要應用程序結束'json.name @ name'到部分的響應中。我怎麼做 ? – 2014-12-19 12:48:37
這似乎沒有解決問題。還有其他建議嗎? – 2015-01-03 06:30:34