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 एक्सटेंशन भूल गए। आरआरएल काम नहीं करता है –