这里是我的index.html.erb
:Rails的动作不渲染
<%= render :action => 'new' %>
<% unless @posts.empty? %>
<%= render @posts %>
<% end %>
的职位显示,但没有在new
页面。
这不是在日志中可以:
Processing PostsController#index (for 127.0.0.1 at 2010-07-27 20:54:28) [GET]
Post Load (0.2ms) SELECT * FROM "posts"
Rendering template within layouts/application
Rendering posts/index
Rendered posts/_post (8.4ms)
另外,如果我只用<%= render :new %>
取代它,我得到的错误:
undefined method `include?' for :new:Symbol
但应该让我暗中渲染动作与Rails 2.3.8。
如果有人能解释这些事情,我将不胜感激。