6
나는 오류가 점점 오전 :누락 된 일부 오류가 3
Missing partial post/questions, application/questions with
{:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :coffee]}.
Searched in:* "/Users/..../<project name>/app/views"
내가 index.html.erb
에 데이터베이스의 모든 게시물을 렌더링하기 위해 노력했다.
내보기 부분은 post/index.html.erb
입니다 :
<!--html codes -->
<%= render 'questions' %>
컨트롤러 controller/post_controller.rb
:
def index
@posts=Post.all
end
def questions
end
questions.html.erb
<%[email protected] do |post| %>
<table>
<tr>
<td>
<h2>
<%=post.title%>
</h2>
</td>
</tr>
<tr>
<td>
<h3><%=post.body%></h3>
</td>
</tr>
<tr>
<td>
This Post comes under:<h4><%=post.tag%></h4>
</td>
</tr>
</table>
thnks .... 작동합니다. – Cyber
문제 없음! 답변을 "수락"하십시오. – cdesrosiers
비슷한 문제가 있습니다 ... .html.erb 확장자를 잊어 버렸습니다. .rb가 작동하지 않습니다. –