@@ -217,40 +217,6 @@ module ActionView
217
217
# </div>
218
218
#
219
219
# 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 %>
254
220
class PartialRenderer < AbstractRenderer
255
221
include CollectionCaching
256
222
0 commit comments