No template found for ReviewsController#create Railsエラー問題の解決するための考え方 その3 ~番外編~
・新規登録後(ユーザー登録の際は必ずアバター画像を入れてください)、 レビューを投稿しても画面が遷移しない(またはTemlate is missing がでる)。
※ターミナルの表示を確認すると、No template found for ReviewsController#createという記述があります。
→app/controllers/reviews_controller.rbのcreateを見に行く。
→ def create
Review.create(create_params)
endを見ると、別のアクションへの遷移先が無い。
→createアクションにredirect_to root_pathを追加。
→redirect_to root_path Review.create(create_params)に直して正解。