mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Remove docs for render layout:
with a block and args
This behavior was removed in 9f5cd01
but these docs were missed.
Fixes #42540
This commit is contained in:
parent
36aee3f544
commit
70a0a766e3
1 changed files with 0 additions and 34 deletions
|
@ -217,40 +217,6 @@ module ActionView
|
||||||
# </div>
|
# </div>
|
||||||
#
|
#
|
||||||
# As you can see, the <tt>:locals</tt> hash is shared between both the partial and its layout.
|
# As you can see, the <tt>:locals</tt> hash is shared between both the partial and its layout.
|
||||||
#
|
|
||||||
# If you pass arguments to "yield" then this will be passed to the block. One way to use this is to pass
|
|
||||||
# an array to layout and treat it as an enumerable.
|
|
||||||
#
|
|
||||||
# <%# app/views/users/_user.html.erb %>
|
|
||||||
# <div class="user">
|
|
||||||
# Budget: $<%= user.budget %>
|
|
||||||
# <%= yield user %>
|
|
||||||
# </div>
|
|
||||||
#
|
|
||||||
# <%# app/views/users/index.html.erb %>
|
|
||||||
# <%= render layout: @users do |user| %>
|
|
||||||
# Title: <%= user.title %>
|
|
||||||
# <% end %>
|
|
||||||
#
|
|
||||||
# This will render the layout for each user and yield to the block, passing the user, each time.
|
|
||||||
#
|
|
||||||
# You can also yield multiple times in one layout and use block arguments to differentiate the sections.
|
|
||||||
#
|
|
||||||
# <%# app/views/users/_user.html.erb %>
|
|
||||||
# <div class="user">
|
|
||||||
# <%= yield user, :header %>
|
|
||||||
# Budget: $<%= user.budget %>
|
|
||||||
# <%= yield user, :footer %>
|
|
||||||
# </div>
|
|
||||||
#
|
|
||||||
# <%# app/views/users/index.html.erb %>
|
|
||||||
# <%= render layout: @users do |user, section| %>
|
|
||||||
# <%- case section when :header -%>
|
|
||||||
# Title: <%= user.title %>
|
|
||||||
# <%- when :footer -%>
|
|
||||||
# Deadline: <%= user.deadline %>
|
|
||||||
# <%- end -%>
|
|
||||||
# <% end %>
|
|
||||||
class PartialRenderer < AbstractRenderer
|
class PartialRenderer < AbstractRenderer
|
||||||
include CollectionCaching
|
include CollectionCaching
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue