“A bit late but this will work: json.array! @list But consider to use it in a block to create a JSON pair: json.data do json.array! @list end # => { "data" : [ "item1", "item2", "item3" ] }”

kent-where-the-light-iskent-where-the-light-is のブックマーク 2017/02/02 10:55

その他

このブックマークにはスターがありません。
最初のスターをつけてみよう!

rails jbuilder - just an array of strings

    \ コメントが サクサク読める アプリです /

    • App Storeからダウンロード
    • Google Playで手に入れよう