Skip to content

Commit 27205ae

Browse files
Merge pull request rails#42617 from zzak/zzak/42540
Remove docs for `render layout:` with a block and args
2 parents f8f18a9 + 70a0a76 commit 27205ae

File tree

1 file changed

+0
-34
lines changed

1 file changed

+0
-34
lines changed

actionview/lib/action_view/renderer/partial_renderer.rb

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -217,40 +217,6 @@ module ActionView
217217
# </div>
218218
#
219219
# As you can see, the <tt>:locals</tt> hash is shared between both the partial and its layout.
220-
#
221-
# If you pass arguments to "yield" then this will be passed to the block. One way to use this is to pass
222-
# an array to layout and treat it as an enumerable.
223-
#
224-
# <%# app/views/users/_user.html.erb %>
225-
# <div class="user">
226-
# Budget: $<%= user.budget %>
227-
# <%= yield user %>
228-
# </div>
229-
#
230-
# <%# app/views/users/index.html.erb %>
231-
# <%= render layout: @users do |user| %>
232-
# Title: <%= user.title %>
233-
# <% end %>
234-
#
235-
# This will render the layout for each user and yield to the block, passing the user, each time.
236-
#
237-
# You can also yield multiple times in one layout and use block arguments to differentiate the sections.
238-
#
239-
# <%# app/views/users/_user.html.erb %>
240-
# <div class="user">
241-
# <%= yield user, :header %>
242-
# Budget: $<%= user.budget %>
243-
# <%= yield user, :footer %>
244-
# </div>
245-
#
246-
# <%# app/views/users/index.html.erb %>
247-
# <%= render layout: @users do |user, section| %>
248-
# <%- case section when :header -%>
249-
# Title: <%= user.title %>
250-
# <%- when :footer -%>
251-
# Deadline: <%= user.deadline %>
252-
# <%- end -%>
253-
# <% end %>
254220
class PartialRenderer < AbstractRenderer
255221
include CollectionCaching
256222

0 commit comments

Comments
 (0)