{"published":"2006-08-02 23:53:46","blog_url":"https://omochist.hatenadiary.org/","version":"1.0","url":"https://omochist.hatenadiary.org/entry/20060802/1154530426","type":"rich","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fomochist.hatenadiary.org%2Fentry%2F20060802%2F1154530426\" title=\"on Rails : \u30e9\u30a4\u30c9\u30fb\u30aa\u30f3\u30fbRails\u306e\u30ea\u30b9\u30c821\u306b\u5bfe\u3059\u308b\u7591\u554f - \u3082\u3061\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","author_url":"https://blog.hatena.ne.jp/omochist/","blog_title":"\u3082\u3061","author_name":"omochist","provider_name":"Hatena Blog","description":"\u3061\u3087\u3063\u3068\u308f\u304b\u3089\u306a\u3044\uff0e Chapter2 P69 \u30ea\u30b9\u30c821 class GoodsController < ApplicationController ... def update_cart @cart = session[:cart] @cart.each do |assoc| item, count = assoc count = params[item.id.to_s].to_i assoc[1] = count end redirect_to :action => 'cart' end ... end \u898b\u305f\u307e\u3093\u307e\uff0c\u30b7\u30e7\u30c3\u30d4\u30f3\u30b0\u30ab\u30fc\u30c8\u3092\u66f4\u65b0\u3059\u308b\u30a2\u30af\u30b7\u30e7\u30f3\uff0e\u30bb\u30c3\u30b7\u30e7\u30f3\u306e\u30ab\u30fc\u30c8\u3092\u8aad\u307f\u8fbc\u3093\u3067\uff0c\u2026","provider_url":"https://hatena.blog","title":"on Rails : \u30e9\u30a4\u30c9\u30fb\u30aa\u30f3\u30fbRails\u306e\u30ea\u30b9\u30c821\u306b\u5bfe\u3059\u308b\u7591\u554f","height":"190","width":"100%","image_url":null,"categories":["Ruby"]}