6
Tôi nhận được một lỗi:Lỗi phần Thiếu trong Rails 3
Missing partial post/questions, application/questions with
{:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :coffee]}.
Searched in:* "/Users/..../<project name>/app/views"
Tôi cố gắng để làm cho tất cả bài viết nào trong cơ sở dữ liệu để index.html.erb
.
xem phần tôi là post/index.html.erb
:
<!--html codes -->
<%= render 'questions' %>
khiển controller/post_controller.rb
: tên tập tin
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 .... nó hoạt động. – Cyber
không sao cả! xin vui lòng "chấp nhận" câu trả lời mặc dù. – cdesrosiers
có vấn đề tương tự ... đã quên phần mở rộng .html.erb. .rb không làm việc lol –