Please write your question in detail here.
(Example) I am making a ●● system with PHP (CakePHP).
The following error message occurred while implementing the ■■ function.
I'm making a blog with a personal application, but when jumping from the new button to the view, I got an ActionView :: MissingTemplate in Articles # new error.
Thanks for your cooperation

Error message

ActionView :: MissingTemplate in Articles # new

Error message

<% = render 'form', article: @article%>This is said to be strange

Applicable source code
Source code

Create a new blog
<% = image_tag 'design_img_f_1617241_s.png', class: 'article-image padding-top-15'%>

<% = render 'form', article: @article%>The error points out here.

By the way, in _form.html.erb,
<% = form_for article do | f |%>

<% = f.label: title, 'title'%>
<% = f.text_field: title, class: 'form-control'%>

<% = f.label: body, 'Body'%>
<% = f.text_area: body, rows: 10, class: 'form-control'%>

<% = f.submit 'Create new', class: 'btn btn-success'%>
<% end%>

It is specified like this.

<% = render 'form', article: @article%>If i change render to link_to, the title and body will disappear.
Please state what you tried for the problem here.
<% = link_to 'form', article: @article%>

Supplemental information (FW/tool version etc.)

Please provide more detailed information here.

  • Answer # 1


    <% = render 'form', article: @article%>This is said to be strange

    The error message is correct. It seems that_form.html.erbdoes not exist.

Related articles