私はCloud9 IDEに私のコードを実行すると、次のエラーが表示されます。欠落テンプレートRailsの
Missing partial submissions/_submission with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby, :coffee, :jbuilder]}. Searched in: * "/usr/local/rvm/gems/ruby-2.3.0/gems/web-console-2.0.0.beta3/lib/action_dispatch/templates" * "/home/ubuntu/workspace/app/views" * "/usr/local/rvm/gems/ruby-2.3.0/gems/web-console-2.0.0.beta3/app/views"
私は提出コントローラを持っており、私のコードを作成するには、このようなものです:
def create
@submission = Submission.new(submission_params)
respond_to do |format|
if @submission.save
format.html { redirect_to root_path}
format.json { render :show, status: :created, location: @submission }
else
format.html { render :new }
format.json { render json: @submission.errors, status: :unprocessable_entity }
end
end
end
私は自分のエラーとその場所を知りません。
プラス、フルスタックのテキストhttp://pastebin.com/YnyQeetU
http://pastebin.com/fZbXd0Wk index.html.erb
'欠落部分の提出/ _submission' - あなたのエラーが言うように、あなたが不足している部分' _submissionを。 html.erb'。あなたがそれを使った場所と部分的な道は何ですか? – dp7
@dkp _submission.html.erbとはどういう意味ですか?私はそのファイルを持っていません、名前が_form、edit、index、show、newのいくつかのファイルを持っています.html.erb –
あなたの意見を確認してください、 '_submission.html.erb'をレンダリングする場所があります。 。ここでレンダリングされる関連ビューを追加することができればよいでしょう。 – dp7