{"title":" mass assignment \u3092\u5b89\u5168\u306b\u3059\u308b\u30d7\u30e9\u30b0\u30a4\u30f3\uff1f","url":"https://halflife.hatenadiary.org/entry/20081006/1223302382","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhalflife.hatenadiary.org%2Fentry%2F20081006%2F1223302382\" title=\" mass assignment \u3092\u5b89\u5168\u306b\u3059\u308b\u30d7\u30e9\u30b0\u30a4\u30f3\uff1f - Halflife\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","categories":["Ruby","Rails"],"width":"100%","author_name":"halflife","version":"1.0","description":"\u306f\u3058\u3081\u3066Rails\u306b\u89e6\u3063\u305f\u3068\u304d\u4e00\u756a\u300c\u843d\u3068\u3057\u7a74\u300d\u3068\u611f\u3058\u305f\u306e\u304cmass assignment \u3060\u3063\u305f\u3002 \u305f\u3068\u3048\u3070\u4e0b\u306e\u3088\u3046\u306a\u3001attr_accessible \u3092\u5fd8\u308c\u305f\u30e2\u30c7\u30eb\u306e\u4f1a\u54e1\u5236\u30d6\u30ed\u30b0\u30a2\u30d7\u30ea\u304c\u3042\u3063\u3066\u3001 class Entry belongs_to :user end class User has_many :entries end scaffold \u3067\u81ea\u52d5\u751f\u6210\u3055\u308c\u308b\u307e\u307e def update @entry = Entry.find(params[:id]) if @entry.update_attributes(params[:entry]) ... \u307f\u305f\u3044\u306bmass assignment\u3092\u4f7f\u3063\u3066\u2026","blog_title":"Halflife","published":"2008-10-06 23:13:02","image_url":null,"provider_name":"Hatena Blog","type":"rich","provider_url":"https://hatena.blog","author_url":"https://blog.hatena.ne.jp/halflife/","height":"190","blog_url":"https://halflife.hatenadiary.org/"}