提交 d3bc9705 编写于 作者: J Joost Baaij

Merge branch 'master' of github.com:lifo/docrails

......@@ -428,7 +428,7 @@ A method for caching fragments of a view rather than an entire action or page. T
<ruby>
<% cache do %>
<%= render :partial => "shared/footer" %>
<%= render "shared/footer" %>
<% end %>
</ruby>
......
......@@ -1056,8 +1056,7 @@ Then in the +app/views/posts/show.html.erb+ you can change it to look like the f
</p>
<h2>Comments</h2>
<%= render :partial => "comments/comment",
:collection => @post.comments %>
<%= render @post.comments %>
<h2>Add a comment:</h2>
<%= form_for([@post, @post.comments.build]) do |f| %>
......@@ -1127,8 +1126,7 @@ Then you make the +app/views/posts/show.html.erb+ look like the following:
</p>
<h2>Comments</h2>
<%= render :partial => "comments/comment",
:collection => @post.comments %>
<%= render @post.comments %>
<h2>Add a comment:</h2>
<%= render "comments/form" %>
......@@ -1381,8 +1379,7 @@ Finally, we will edit the <tt>app/views/posts/show.html.erb</tt> template to sho
</p>
<h2>Comments</h2>
<%= render :partial => "comments/comment",
:collection => @post.comments %>
<%= render @post.comments %>
<h2>Add a comment:</h2>
<%= render "comments/form" %>
......@@ -1436,8 +1433,7 @@ Now you can edit the view in <tt>app/views/posts/show.html.erb</tt> to look like
</p>
<h2>Comments</h2>
<%= render :partial => "comments/comment",
:collection => @post.comments %>
<%= render @post.comments %>
<h2>Add a comment:</h2>
<%= render "comments/form" %>
......
......@@ -469,7 +469,7 @@ And in "views":http://api.rubyonrails.org/classes/ActionController/Benchmarking/
<erb>
<% benchmark("Showing projects partial") do %>
<%= render :partial => @projects %>
<%= render @projects %>
<% end %>
</erb>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册