デバッグコード
debug() というヘルパーメソッドでオブジェクトの内容をHTMLでダンプしてくれる.
[app/views/books/list.rhtml] <% for book in @books %> <%= debug(book) %>
表示結果は以下
--- !ruby/object:Book attributes: created_on: 2007-02-01 21:01:00 ISBN: "98888888888888" review: test,test title: testbook picture_url: "" date_on: "2007-02-01" id: "2" link: aaaaa