1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Remove misleading documentation

The docs for ActionView partial renderer state:

> NOTE: Due to backwards compatibility concerns, the collection can't be one of hashes. Normally you'd also just keep domain objects, like Active Records, in there.

The reporter stated:

> I can render a collection of hashes without problems:
>
> = render :partial => "info_row", :collection => my_collection, :as => :d

I tested this in a Rails 6.0 rc2 app and hashes were passed as described. Fixes #36897. [ci skip]
This commit is contained in:
Will Jessop 2019-08-10 02:51:37 +01:00
parent 599c170d8e
commit fdb6a90794
No known key found for this signature in database
GPG key ID: ABD049BCC56E8A52

View file

@ -105,9 +105,6 @@ module ActionView
# #
# <%= render(partial: "ad", collection: @advertisements) || "There's no ad to be displayed" %> # <%= render(partial: "ad", collection: @advertisements) || "There's no ad to be displayed" %>
# #
# NOTE: Due to backwards compatibility concerns, the collection can't be one of hashes. Normally you'd also
# just keep domain objects, like Active Records, in there.
#
# == \Rendering shared partials # == \Rendering shared partials
# #
# Two controllers can share a set of partials and render them like this: # Two controllers can share a set of partials and render them like this: