{"version":"1.0","blog_title":"0208","image_url":null,"title":"Rails \u5909\u6570\u3092controller\u3067\u5165\u529b\u3059\u308b\u3068\u304d params\u304c\u30bb\u30fc\u30d6\u3067\u304d\u306a\u3044\u3068\u304d\u306e\u30a8\u30e9\u30fc","provider_url":"https://hatena.blog","author_name":"haruokny","provider_name":"Hatena Blog","blog_url":"https://toughandglobal.hateblo.jp/","url":"https://toughandglobal.hateblo.jp/entry/2015/03/31/202602","published":"2015-03-31 20:26:02","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftoughandglobal.hateblo.jp%2Fentry%2F2015%2F03%2F31%2F202602\" title=\"Rails \u5909\u6570\u3092controller\u3067\u5165\u529b\u3059\u308b\u3068\u304d params\u304c\u30bb\u30fc\u30d6\u3067\u304d\u306a\u3044\u3068\u304d\u306e\u30a8\u30e9\u30fc - 0208\" 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","type":"rich","width":"100%","author_url":"https://blog.hatena.ne.jp/haruokny/","description":"\u5909\u6570\u3092controller\u3067\u5165\u529b\u3059\u308b\u3068\u304dparams\u304c\u30bb\u30fc\u30d6\u3067\u304d\u306a\u3044\u3068\u304d\u306e\u30a8\u30e9\u30fc create(save\u3068\u3044\u3046\u30e1\u30bd\u30c3\u30c9\u3082\u540c\u6642\u306b\u3057\u3066\u3057\u307e\u3046\u30e1\u30bd\u30c3\u30c9)\u3067\u306f\u306a\u304f\u3001\u305d\u3053\u3067build\u3092\u4f7f\u3063\u3066\u304b\u3089save\u3055\u305b\u308b\u3002 \u5143\u306e\u30b3\u30fc\u30c9\uff1a def create @user = current_user @question = Question.find(params[:question_id]) @answer = @question.answers.create(answer_params) @answer.user_id = @user.id end \u30a8\u30e9\u30fc\uff1a\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u306f\u3067\u306a\u3044\u304cparams\u304c\u6e21\u3055\u308c\u3066\u3044\u306a\u3044\u2026","categories":[]}