def create @recipe = Recipe.new(recipe_params) if @recipe.save redirect_to @recipe, notice: "Successfully created new recipe" else render 'new' end end
のように、redirect_toやrenderにインスタンス変数が使われているとき、どういった処理が行われているのでしょうか?
どんなときにredirect_toやrenderにインスタンス変数を使っていいのか分かりません。
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。