{"author_name":"yujitoyd","categories":[],"author_url":"https://blog.hatena.ne.jp/yujitoyd/","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fyujitoyd.hatenadiary.org%2Fentry%2F20090110%2F1231620971\" title=\"Rails\u3067\u306e\u9045\u5ef6\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u3068\u4e26\u884c\u6027 - Kinetic Programmer (by Yuji Toyoda)\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","provider_name":"Hatena Blog","title":"Rails\u3067\u306e\u9045\u5ef6\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u3068\u4e26\u884c\u6027","type":"rich","image_url":null,"blog_title":"Kinetic Programmer (by Yuji Toyoda)","provider_url":"https://hatena.blog","published":"2009-01-10 05:56:11","url":"https://yujitoyd.hatenadiary.org/entry/20090110/1231620971","width":"100%","blog_url":"https://yujitoyd.hatenadiary.org/","height":"190","description":"\u7d4c\u9a13\u4e0a\u3001\u697d\u89b3\u7684\u30ed\u30c3\u30af\u306e\u5834\u5408\u306f\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u3092\u59cb\u3081\u308b\u524d\u306b\u5bfe\u8c61\u30ec\u30b3\u30fc\u30c9\u3092\u3059\u3079\u3066\u8aad\u307f\u8fbc\u3093\u3067\u3057\u307e\u3044\u3001\u5fc5\u8981\u306a\u51e6\u7406\u3092\u65bd\u3057(\u30ab\u30e9\u30e0\u30c7\u30fc\u30bf\u306e\u5909\u66f4\u306a\u3069)\u3001\u305d\u306e\u5f8c\u3067\u3001ActiveRecord::Base.transaction\u3067\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u3092\u958b\u59cb\u3057\u3001\u30ec\u30b3\u30fc\u30c9\u3092\u307e\u3068\u3081\u3066\u4fdd\u5b58\u3059\u308b(save!\u3092\u4f7f\u3046)\u3002\u3059\u308b\u3068\u3001\u8907\u6570\u30c6\u30fc\u30d6\u30eb\u3092\u540c\u6642\u306b\u66f4\u65b0\u3059\u308b\u969b\u306e\u539f\u5b50\u6027\u3092\u78ba\u4fdd\u3057\u3084\u3059\u3044\u3002\u3042\u3089\u304b\u3058\u3081\u3001\u95a2\u9023\u3059\u308b\u30ec\u30b3\u30fc\u30c9\u3092\u30ed\u30c3\u30af\u3057\u3066\u304b\u3089\u30ec\u30b3\u30fc\u30c9\u306e\u8aad\u307f\u51fa\u3057\u3092\u884c\u3046\u3088\u3046\u306a\u5834\u5408\u306f(\u60b2\u89b3\u7684\u30ed\u30c3\u30af\u3092\u4f75\u7528\u3059\u308b\u5834\u5408\u306f)\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u30d6\u30ed\u30c3\u30af\u3067\u3001sample_model = SampleModel.find(:first, :lock => true)\u306e\u3088\u3046\u2026","version":"1.0"}