ruby on railsの質問です。
articles controllerにcreateアクションを定義して、「a template is missing」と表示させたい。
発生している問題・エラーメッセージ
def createと入力しても
Unknown action
the action 'create' could not be found for articles controller
と表示されます。
render plain: params[:article].inspectと記入してみると、
<ActionController::Parameters {"title"=>"こんにちわ", "text"=>"さようなら"} permitted: false>```と表示されます。
該当のソースコード
class ArticlesController < ApplicationController
def new
end
def create
render plain: params[:article].inspect
raise params.inspect
end
end
試したこと
https://www.youtube.com/watch?v=fbLvUa2ImDs&index=6&list=PLLtm0VpE-z3NMFXMaLW6NqSVHqLLLAIRi
を参考にして取り組んでいます。
ここに問題に対して試したことを記載してください。
補足情報(FW/ツールのバージョンなど)
ここにより詳細な情報を記載してください。
あなたの回答
tips
プレビュー