{"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fohbarye.hatenablog.jp%2Fentry%2F2017%2F08%2F25%2F003603\" title=\"Controller spec \u3067 render_to_string \u306e\u7d50\u679c\u304c empty string \u306b\u306a\u308b - valid,invalid\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","height":"190","author_name":"ohbarye","url":"https://ohbarye.hatenablog.jp/entry/2017/08/25/003603","provider_url":"https://hatena.blog","image_url":null,"width":"100%","categories":["Ruby on Rails"],"provider_name":"Hatena Blog","title":"Controller spec \u3067 render_to_string \u306e\u7d50\u679c\u304c empty string \u306b\u306a\u308b","published":"2017-08-25 00:36:03","version":"1.0","author_url":"https://blog.hatena.ne.jp/ohbarye/","blog_url":"https://ohbarye.hatenablog.jp/","type":"rich","description":"View \u3067\u3061\u3087\u3063\u3068\u9811\u5f35\u308b\u5fc5\u8981\u304c\u3042\u308a Controller \u304b\u3089 render_to_string \u3067\u6587\u5b57\u5217\u3092\u5f97\u3066\u304b\u3089 JSON \u306b\u7a81\u3063\u8fbc\u3080\u3088\u3046\u306a\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u304c\u3042\u308b\u3068\u3059\u308b\u3002 # controller/books_controller.rb class BooksController # GET /book/:id def show @book = Books.find! params[:id] render json: { book: render_to_string(:show), meta: @book.meta, } end end # view/books/show.erb <%= \u2026","blog_title":"valid,invalid"}